views:

115

answers:

1

It is the first time I use Capistrano and the application had been already published without it. When I type cap deploy:migrations I get the following error after some successful commands:

  * executing "cd /home/collimarco/foto-fiori.com/releases/20090818111104; rake RAILS_ENV=production  db:migrate"
    servers: ["foto-fiori.com"]
    [foto-fiori.com] executing command
 ** [out :: foto-fiori.com] (in /home/collimarco/foto-fiori.com/releases/20090818111104)
 ** [out :: foto-fiori.com] Missing the Rails 2.3.3 gem. Please `gem install -v=2.3.3 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.
    command finished
failed: "sh -c 'cd /home/collimarco/foto-fiori.com/releases/20090818111104; rake RAILS_ENV=production  db:migrate'" on foto-fiori.com

I tried to comment out RAILS_GEM_VERSION from environment.rb, but is the same.

I also typed the last commands manually:

$ cd /home/collimarco/foto-fiori.com/releases/20090818111104
$ rake RAILS_ENV=production  db:migrate
(in /home/collimarco/foto-fiori.com/releases/20090818111104)
rake aborted!
No such file or directory - /home/collimarco/foto-fiori.com/releases/20090818111104/config/database.yml
/home/collimarco/foto-fiori.com/releases/20090818111104/Rakefile:10
(See full trace by running task with --trace)

Any ideas?

+1  A: 
 ** [out :: foto-fiori.com] Missing the Rails 2.3.3 gem. Please `gem install -v=2.3.3 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

Your problem is right in there. You need to install Rails 2.3.3.

It also looks like you're missing your database.yml file, and I'm assuming that's just something source control missed?

Matt Grande
Don't put database.yml in your source control. You should have it in you #{shared_path}/config and you copy it over it your config directory using after deploy:update_code hook in your deploy.rbPutting this file in source control is a security risk.
railsninja