We'll respond shortly.
rake db:drop deliberately ignores exceptions and does not return a non-zero error code to the shell. A pivot has a need to know that the database was, indeed dropped, without errors. How to do it? Don’t rewrite the ‘db:drop’ task; it is a messy 40+ line task that needs to connect to database adapters, etc. You could run
rake db:version — it will return an exit(1) if there’s no database there.
Can Rails scaffold handle nested resources properly? “No” was the almost instant, if not prescient response. Use one of the alternatives.