rake aborted! development database is not configured.

July 2nd, 2009

You might have been happily running migrations on your development box for weeks and go to get the application set up on a production server.
And all might even have been going well until you ran

rake db:migrate

only to see it crash and burn like this.

** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
development database is not configured

Fear not ye intrepid developer!
This happens when you leave out the development specifications in your database.yml.
(If you don’t define development.rb, you’ll get a weirder “No such file or directory – …../development.rb” error)

Apparently rake db:migrate runs in development mode no matter what environment you’re in (still looking into the reason for this).
So what you have to do is call migrate like this

rake db:migrate RAILS_ENV=production <—- or whatever your environment is

That should get you back on the path to true happiness.

Entry Filed under: rails_errors

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

July 2010
S M T W T F S
« Apr    
 123
45678910
11121314151617
18192021222324
25262728293031

Shared Rails Hosting

Most Recent Posts

Categories