Rails Capistrano部署找不到Rake



我正在使用Capistrano,Unicorn,rbenv,nginx,linode,ubuntu 12.04部署我的第一个铁路应用。当我运行

bin/cap部署:冷

在我的应用程序root中,我会收回以下错误:

  * 2012-10-31 01:19:36 executing `bundle:install'
  * executing "cd /home/mr_deployer/apps/prjct_mngr/releases/20121031001933 && bundle install --gemfile /home/mr_deployer/apps/prjct_mngr/releases/20121031001933/Gemfile --path /home/mr_deployer/apps/prjct_mngr/shared/bundle --deployment --quiet --without development test"
    servers: ["xxxxxxxxxxxxx"]
    [xxxxxxxxxxxxx] executing command
 ** [out :: xxxxxxxxxxxxx] Could not find rake-0.9.2.2 in any of the sources
 ** [out :: xxxxxxxxxxxxx] Run `bundle install` to install missing gems.
    command finished in 1046ms
*** [deploy:update_code] rolling back
  * executing "rm -rf /home/mr_deployer/apps/prjct_mngr/releases/20121031001933; true"
    servers: ["xxxxxxxxxxxxx"]
    [xxxxxxxxxxxxx] executing command
    command finished in 625ms
failed: "sh -c 'cd /home/mr_deployer/apps/prjct_mngr/releases/20121031001933 && bundle install --gemfile /home/mr_deployer/apps/prjct_mngr/releases/20121031001933/Gemfile --path /home/mr_deployer/apps/prjct_mngr/shared/bundle --deployment --quiet --without development test'" on xxxxxxxxxxxxx

我已经在开发机上运行捆绑包安装了 - 路径供应商/捆绑包,并且在Dev Machine和Linode VPS上同时安装了GEM Rake。为什么找不到耙子?

更新:

我尝试在linode上添加linode上的rake gem的路径,并在linode和:deploy.rb文件中的default_envoronment上添加。仍然遇到相同的错误...

尝试在Capistrano接收中指定您的路径,例如:

default_environment["PATH"] = "/usr/local/bin:/usr/bin:/usr/local/rvm/bin/:/var/lib/gems/1.9.1/bin"

如果您不知道如何看待您的路径,请通过SSH连接到服务器并运行命令

echo $PATH

Capistrano尝试在部署到的远程计算机上运行命令cd /home/mr_deployer/apps/prjct_mngr/releases/20121031001933 && bundle install --gemfile /home/mr_deployer/apps/prjct_mngr/releases/20121031001933/Gemfile --path /home/mr_deployer/apps/prjct_mngr/shared/bundle --deployment --quiet --without development test

看起来远程节点没有安装rake试图使用的CC_2。

也许您应该检查所有必要的宝石都安装在远程计算机上。

此错误并未表明您部署到的机器上未安装耙子。此错误意味着,当Bundler尝试安装您的宝石时,无法在您的Gemfile中列出的来源中找到Rake版本0.9.2.2。您的Gemfile是否包含source "http://rubygems.org"之类的行?

最新更新