This project is archived and is in readonly mode.

#3711 ✓committed

[PATCH] boot.rb doesn't take --skip-activerecord into account

Reported by ravinggenius | January 16th, 2010 @ 06:16 PM

2010-01-16 12:44:37

followed instructions at

  • generated new application with --dev -JO. (I skipped ActiveRecord so I could use DataMapper.)
  • ./script/generate (with no options)
    • errors out with the following: /home/thomas/Code/rails3/railties/lib/rails/configuration.rb:162:in read': No such file or directory - /home/thomas/Code/rg-scratchpad/config/database.yml (Errno::ENOENT)

config/database.yml doesn't exist, but I'm assuming that is because of the -O flag. If that is the case, I should see a friendly warning, at most. Better would be to skip loading this file if ActiveRecord not loaded. Or at least checking to see if it exists before loading it. Just my two cents.... Here is the full stack-trace:

/home/thomas/Code/rails3/railties/lib/rails/configuration.rb:162:in read': No such file or directory - /home/thomas/Code/rg-scratchpad/config/database.yml (Errno::ENOENT)

  • from /home/thomas/Code/rails3/railties/lib/rails/configuration.rb:162:in database_configuration'
  • from /home/thomas/Code/rails3/activerecord/lib/active_record/railtie.rb:30
  • from /home/thomas/Code/rails3/railties/lib/rails/initializable.rb:29:in instance_exec'
  • from /home/thomas/Code/rails3/railties/lib/rails/initializable.rb:29:in run'
  • from /home/thomas/Code/rails3/railties/lib/rails/initializable.rb:67:in run_initializers'
  • from /home/thomas/Code/rails3/railties/lib/rails/initializable.rb:66:in each'
  • from /home/thomas/Code/rails3/railties/lib/rails/initializable.rb:66:in run_initializers'
  • from /home/thomas/Code/rails3/railties/lib/rails/application.rb:38:in initialize!'
  • from /home/thomas/Code/rails3/railties/lib/rails/application.rb:12:in __send__'
  • from /home/thomas/Code/rails3/railties/lib/rails/application.rb:12:in initialize!'
  • from /home/thomas/Code/rg-scratchpad/config/environment.rb:5
  • from script/generate:2:in require'
  • from script/generate:2

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket

Referenced by