[英]“Gem bundler is not installed” in Capistrano deployment
Here is the error caused by rake in Capistrano deployment. 这是Capistrano部署中的抽佣引起的错误。 The error also causes the rollback and failure of the rails 3.1.3 deployment (with rvm installed for single user). 该错误还会导致Rails 3.1.3部署的回滚和失败(为单个用户安装了rvm)。
** [out :: 76.195.225.93] ←[31mERROR: Gem bundler is not installed, run `gem in
command finished in 54ms
*** [deploy:update_code] rolling back
* executing "rm -rf /var/www/byop/releases/20120302230229; true"
gem list
shows bundler 1.0.22 installed. gem list
显示已安装捆绑程序1.0.22。 What could cause the error? 是什么导致错误? Is it because of the rvm? 是因为rvm吗? Thanks so much. 非常感谢。
The error disappeared after adding the following in deploy.rb and deployed successfully: 在deploy.rb中添加以下内容并成功部署后,该错误消失了:
task :gems, :roles => :web, :except => { :no_release => true } do
run "cd #{current_path}; #{shared_path}/bin/bundle unlock"
run "cd #{current_path}; nice -19 #{shared_path}/bin/bundle install vendor/" # nice -19 is very important otherwise DH will kill the process!
run "cd #{current_path}; #{shared_path}/bin/bundle lock"
end
More reading here: Bundle install failing when deploying a Rails 3 app to Dreamhost with Capistrano 在此处详细阅读: 使用Capistrano将Rails 3应用程序部署到Dreamhost时,捆绑安装失败
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.