2015-03-30 81 views
2

我想用capistrano3推Rails4應用程序。 但是當我嘗試,我得到這些錯誤:Rails和capistrano部署:捆綁stderr:沒有寫入

INFO [c7c799a8] Running /containers/30054/.rvm/bin/rvm 2.0.0-p598 do bundle install --path /containers/30054/sites/myapp/shared/bundle --without development test --deployment --quiet as [email protected] 
DEBUG [c7c799a8] Command: cd /containers/30054/sites/myapp/releases/20150330171635 && (RVM_BIN_PATH=/containers/30054/.rvm/bin /containers/30054/.rvm/bin/rvm 2.0.0-p598 do bundle install --path /containers/30054/sites/myapp/shared/bundle --without development test --deployment --quiet) 
DEBUG [c7c799a8] You are trying to install in deployment mode after changing 
DEBUG [c7c799a8] your Gemfile. Run `bundle install` elsewhere and add the 
DEBUG [c7c799a8] updated Gemfile.lock to version control. 
DEBUG [c7c799a8]  
DEBUG [c7c799a8] You have deleted from the Gemfile: 
DEBUG [c7c799a8] * capistrano (~> 3.3.0) 
DEBUG [c7c799a8] * capistrano-bundler (~> 1.1.2) 
DEBUG [c7c799a8] * capistrano-rails (~> 1.1) 
DEBUG [c7c799a8] * capistrano-rvm 
DEBUG [c7c799a8] * capistrano3-puma 
DEBUG [c7c799a8] * mysql2 (~> 0.3.11) 
DEBUG [c7c799a8] * puma 
(Backtrace restricted to imported tasks) 
cap aborted! 
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: bundle exit status: 16 
bundle stdout: You are trying to install in deployment mode after changing 
your Gemfile. Run `bundle install` elsewhere and add the 
updated Gemfile.lock to version control. 

You have deleted from the Gemfile: 
* capistrano (~> 3.3.0) 
* capistrano-bundler (~> 1.1.2) 
* capistrano-rails (~> 1.1) 
* capistrano-rvm 
* capistrano3-puma 
* mysql2 (~> 0.3.11) 
* puma 
bundle stderr: Nothing written 

SSHKit::Command::Failed: bundle exit status: 16 
bundle stdout: You are trying to install in deployment mode after changing 
your Gemfile. Run `bundle install` elsewhere and add the 
updated Gemfile.lock to version control. 

You have deleted from the Gemfile: 
* capistrano (~> 3.3.0) 
* capistrano-bundler (~> 1.1.2) 
* capistrano-rails (~> 1.1) 
* capistrano-rvm 
* capistrano3-puma 
* mysql2 (~> 0.3.11) 
* puma 
bundle stderr: Nothing written 

Tasks: TOP => deploy:updated => bundler:install 
(See full trace by running task with --trace) 
The deploy has failed with an error: Exception while executing as [email protected]: bundle exit status: 16 
bundle stdout: You are trying to install in deployment mode after changing 
your Gemfile. Run `bundle install` elsewhere and add the 
updated Gemfile.lock to version control. 

You have deleted from the Gemfile: 
* capistrano (~> 3.3.0) 
* capistrano-bundler (~> 1.1.2) 
* capistrano-rails (~> 1.1) 
* capistrano-rvm 
* capistrano3-puma 
* mysql2 (~> 0.3.11) 
* puma 
bundle stderr: Nothing written 

裏面我deploy.rb我沒有具體的任務和我的SCM不包括Gemfile中和Gemfile.lock的。

有什麼問題?

回答

3

看來您已更改Gemfile,但未在本地計算機上運行軟件包安裝。 所以你的Gemfile和Gemfile.lock不同步。

在本地機器上運行軟件包安裝以更新Gemfile.lock,然後提交併推送更改。

+0

我忘了提到這一點:我已經嘗試過,並且都完美版本化/推送。 – 2015-03-30 18:17:44

+0

如果我是你,我會比較服務器上的Gemfile.lock與本地Gemfile.lock。可能它是一些capistrano/git問題。 – 2015-03-30 18:37:47

+0

服務器上的Gemfile.lock和本地機器之間沒有差異。我在谷歌搜索,我找不到任何有用的東西。 – 2015-03-30 18:45:21