How do I install all the gems from my environment.rb (Rails 2)
I tried rake gems:install but I get
No such file or directory - /Users/macuser/开发者_Go百科Sites/hq_channel/config/database.yml
I bet the default is set wrong.
What file do I need to change? And where do I find what to change it to?
it can't find your database.yml file, which is a required config file that should have been generated when you made a new project. Without that being there, the rails environment won't start, which means no rake tasks work
Often times folks create a database.yml.example. I typically do a:
[rails_root]$cp config/database.yml.example config/database.yml
Edit the file to match my environment, then try to install the gems/migrate the DB.
However - this is often times hit-or-miss due to a plethora of different reasons (environment.rb code, bootstrapping/initializer issues, vendored gems w/ C extensions, etc..).
If the app is on Rails 2.3 (you only specified 2), you may be able to override the standard rake gems:install
with a little Bundler joy.
精彩评论