2012-03-03 476 views
0

以下是由Capistrano部署中的耙引起的錯誤。該錯誤還會導致rails 3.1.3部署的回滾和失敗(爲單個用戶安裝rvm)。Capistrano部署中的「未安裝Gem bundler」

** [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 installed。什麼可能導致錯誤?是因爲rvm嗎?非常感謝。

+0

這個錯誤看起來像'.rvmrc'文件,你確定紅寶石指定有安裝? – mpapis 2012-03-03 02:42:59

回答

0

錯誤添加在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 

更多閱讀這裏:Bundle install failing when deploying a Rails 3 app to Dreamhost with Capistrano