我项目的最新分支包括基于升级到Bundler 1.10.5的Gemfile更改,特别是对两个内部gem使用源块 . 这似乎是尝试部署到测试服务器时出现问题的原因,其中capistrano引发错误并回滚部署 .

命令生成错误:

bundle install --gemfile /path/to/Gemfile --path /path/to/shared/bundle --deployment --without development test

错误消息(匿名的私人数据,但在原始数据中):

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:
* internal_gem1 (= 0.1.11)
* internal_gem2 (= 0.0.6)

You have changed in the Gemfile:
* internal_gem1 from `no specified source` to `rubygems repository

http://rubygems.org/, https://REDACTED@gem.fury.io/me/`
* internal_gem2 from `no specified source` to `rubygems repository
http://rubygems.org/, https://REDACTED@gem.fury.io/me/`

Gemfile 包含以下行:

source 'http://rubygems.org'
source 'https://REDACTED@gem.fury.io/me/' do
  gem 'internal_gem1', '0.1.11' #, :path => '/path/to/gem/optional'
  gem 'internal_gem2', '0.0.6'
end

gem "bundler", "~> 1.7"
... 
# more gems and some groups follow
...

BUNDLED WITH
   1.10.5

根据常识和对this answer的评论,我尝试在测试服务器上运行 gem install bundler -v '1.10.5' ,它似乎已安装(安装消息显示成功, gem which bundler 返回包含新版本号的路径),但部署中没有变化错误 .

GemfileGemfile.lock 都在git中跟踪并部署到服务器(根据this answer) . 没有 vendor/cache 目录(根据this answer) . 一切都在本地顺利进行,并且几个小时前在Gemfile中没有源块的分支部署顺利进行 . 如何修复此Bundler部署问题?