我想用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。
问题是什么?
答案 0 :(得分:4)
您似乎更改了Gemfile,但没有在本地计算机上运行bundle install。 所以你的Gemfile和Gemfile.lock不同步。
在本地计算机上运行bundle install以更新Gemfile.lock,然后提交并推送更改。