Search code examples
ruby-on-railsrubyactiverecord

rails 2.3.5 - bug makes ActiveRecord::Base.configurations false. How do I track it down?


I've been updating my user test server and now suddenly I got an error every time I invoke rake with anything database-related.

Sample error:

rake db:drop RAILS_ENV='production' --trace

rake aborted!
undefined method `[]' for false:FalseClass
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:96

Here's line 96 of that databases.rake:

config = ActiveRecord::Base.configurations[RAILS_ENV || 'development']

So it seems that Base.configurations is ´false´ instead of being an array.

I've been fighting this for a couple hours now but I could not find anything on my source.

Google didn't provide any useful hints.

Could anyone point out any obvious reasons why this member is false?


Solution

  • The problem was that my database.yml was missing.