This project is archived and is in readonly mode.
[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 http://blog.envylabs.com/2010/01/getting-started-with-the-rails-3-b...
- 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)
- errors out with the following:
/home/thomas/Code/rails3/railties/lib/rails/configuration.rb:162:in
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
-
José Valim January 16th, 2010 @ 09:44 PM
- Assigned user set to José Valim
-
Rizwan Reza January 16th, 2010 @ 10:40 PM
- Tag set to 3.0, bugmash, patch, review
- Title changed from script/generate fails when config/database.yml doesn't exist to [PATCH] boot.rb doesn't take --skip-activerecord into account
Basically, the error is because boot.rb is not being changed to not require ActiveRecord. This patch fixes that and also a test which was commented out.
I've verified this by reapplying it to master. All tests pass.
-
Repository January 17th, 2010 @ 01:56 PM
(from [e3898bda9cb0e6d7e63cd8f6d4ecec96209bfd4d]) Take --skip-activerecord into account boot.rb requires. [#3711 status:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/e3898bda9cb0e6d7e63cd8f6d4ecec... -
José Valim January 17th, 2010 @ 01:58 PM
- State changed from new to committed
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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 3711 [PATCH] boot.rb doesn't take --skip-activerecord into account (from [e3898bda9cb0e6d7e63cd8f6d4ecec96209bfd4d]) Take --...