Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

undefined method `new' for Rails::Configuration:Module when running rake db:setup

#3784
~/dev/rails3testapp(master)  $ ruby -v
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.2.0]
~/dev/rails3testapp(master)  $ rake --trace db:setup
(in /Users/zackchandler/dev/rails3testapp)
** Invoke db:setup (first_time)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
rake aborted!
undefined method `new' for Rails::Configuration:Module
/Users/zackchandler/dev/rails/activerecord/lib/active_record/railties/databases.rake:4:in `block (2 levels) in <top (required)>'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain'
/Users/zackchandler/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/monitor.rb:190:in `mon_synchronize'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:607:in `block in invoke_prerequisites'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:596:in `block in invoke_with_call_chain'
/Users/zackchandler/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/monitor.rb:190:in `mon_synchronize'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:607:in `block in invoke_prerequisites'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:596:in `block in invoke_with_call_chain'
/Users/zackchandler/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/monitor.rb:190:in `mon_synchronize'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Users/zackchandler/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
/Users/zackchandler/.rvm/rubies/ruby-1.9.1-p378/bin/rake:22:in `load'
/Users/zackchandler/.rvm/rubies/ruby-1.9.1-p378/bin/rake:22:in `<main>'
~/dev/rails3testapp(master)  $

Reported by Zack Chandler · January 24th, 2010 @ 10:53 PM

State: resolved
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Scott Marshall
    Scott Marshall

    I ran into the same issue. I checked out a random commit from 1/23/10 and rake db:create worked. Must have been something done in the last day.

    January 25th, 2010 @ 02:29 AM

  2. Ryan Bigg
    Ryan Bigg

    It seems this has to do with the Engine additions. Rails::Configuration is now Rails::Application::Configuration but simply changing it over in databases.rake does not fix the issue.

    January 25th, 2010 @ 12:09 PM

  3. Ryan Bigg
  4. Ryan Bigg
    Ryan Bigg

    And another with a suggestion from snusnu to use Rails::Application.instance.config instead.

    January 25th, 2010 @ 12:46 PM

  5. Martin Gamsjaeger (snusnu)
  6. Yehuda Katz (wycats)
    Yehuda Katz (wycats)
    • State changed from new to resolved

    January 26th, 2010 @ 02:31 AM