Rails和capistrano部署:bundle stderr:没写什么

问题描述 投票:2回答:2

我想使用capistrano3推送Rails4应用程序。但是当我尝试时,出现以下错误:

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 user@MYSERVER
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 user@MYSERVER: 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 user@MYSERVER: 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。

怎么了?

ruby-on-rails ruby capistrano3
2个回答
4
投票
似乎您更改了Gemfile,但未在本地计算机上运行bundle install。因此,您的Gemfile和Gemfile.lock不同步。

在本地计算机上运行捆绑安装以更新Gemfile.lock,然后提交并推送更改。


0
投票
感谢Mich,我也面临着相同的错误问题。
© www.soinside.com 2019 - 2024. All rights reserved.