卡皮斯特拉诺的失败

时间:2009-08-18 11:28:24

标签: ruby-on-rails deployment capistrano

这是我第一次使用Capistrano并且应用程序已经在没有它的情况下发布。当我键入cap deploy:migrations时,我在一些成功的命令后收到以下错误:

  * 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

我试图从environment.rb中注释掉RAILS_GEM_VERSION,但它是一样的。

我还手动输入了最后一个命令:

$ 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)

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

 ** [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.

你的问题就在那里。您需要安装Rails 2.3.3。

看起来你还错过了database.yml文件,而我认为这只是源控制丢失了?