views:

36

answers:

2

I tried rake gems:install but I get

No such file or directory - /Users/macuser/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?

+3  A: 

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

Matt Briggs
Ah ok. i just cloned this off a repo. Looks like it didn't come through with the clone.
Trip
often database.yml will be named something different or just not checked in, because each machine the project is installed on probably has their dbs set up different, and you don't want a merge conflict every time you pull
Matt Briggs
I copied the database.yml over 'as is'. I was able to install two of them gems, but not all of them. I heard that most of the gems were vendored. Is there a different command I have to write?
Trip
vendored gems mean you don't need to install them on your system, since they are installed in the vendor directory.
Matt Briggs
+1  A: 

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.

Brian
Its 2.3.5. Bundler does sound joyful. How do you gems/migrate the DB? I had did `sudo rake gems:install`, and it seemed to only install 2 of the 15-20 gems in it.
Trip
Brian
Sorry last question, would running bundle on this machine, effect other machines involved if they don't want to use Bundle?
Trip
Hmm, I think it would impact others using the codebase as you would be updating a few rails config files in the app to require/use bundler.
Brian
Actually, I suppose you could do the bundle install then revert all the configuration changes you made...
Brian