Capistrano:无法在任何来源中找到 rake-$WRONG_VERSION

Capistrano: Could not find rake-$WRONG_VERSION in any of the sources

我们在服务器上使用 rvm,我刚刚升级到 Ruby 2.3.1。现在,当我尝试将我们的项目部署到登台服务器时,我收到此错误消息:

** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:

 DEBUG [49e3047b] Finished in 0.269 seconds with exit status 0 (successful).
  INFO [96bd9c75] Running ~/.rvm/bin/rvm default do bundle exec rake gettext:pack as deployer@nginx-stage.webit.local
 DEBUG [96bd9c75] Command: cd /home/deployer/PROJECTNAME/current && ( export RAILS_ENV="production" ; ~/.rvm/bin/rvm default do bundle exec rake gettext:pack )
 DEBUG [96bd9c75]       /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/spec_set.rb:95:in `block in materialize'
 DEBUG [96bd9c75]       :
 DEBUG [96bd9c75]       Could not find rake-11.1.2 in any of the sources
 DEBUG [96bd9c75]        (
 DEBUG [96bd9c75]       Bundler::GemNotFound
 DEBUG [96bd9c75]       )
 DEBUG [96bd9c75]               from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/spec_set.rb:88:in `map!'
 DEBUG [96bd9c75]               from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/spec_set.rb:88:in `materialize'
 DEBUG [96bd9c75]               from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/definition.rb:140:in `specs'
 DEBUG [96bd9c75]               from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/definition.rb:185:in `specs_for'
 DEBUG [96bd9c75]               from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/definition.rb:174:in `requested_specs'
 DEBUG [96bd9c75]               from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/environment.rb:19:in `requested_specs'
 DEBUG [96bd9c75]               from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/runtime.rb:14:in `setup'
 DEBUG [96bd9c75]               from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler.rb:95:in `setup'
 DEBUG [96bd9c75]               from /home/deployer/.rvm/gems/ruby-2.3.1@global/gems/bundler-1.12.5/lib/bundler/setup.rb:19:in `<top (required)>'
 DEBUG [96bd9c75]               from /home/deployer/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
 DEBUG [96bd9c75]               from /home/deployer/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'

这很奇怪,因为 Gemfile.lock 在版本 11.2.2 上有抽成!当我通过 ssh 连接到登台服务器并执行手动 bundle install 时,一切正常。这是暂存服务器上的 .bundle/config 文件:

---
BUNDLE_FROZEN: '1'
BUNDLE_PATH: "/home/deployer/PROJECTNAME/shared/bundle"
BUNDLE_WITHOUT: development:test
BUNDLE_DISABLE_SHARED_GEMS: true

我更新了 capistrano、bundler、passenger 和 nginx,但我就是无法让它工作。我也删除了 /home/deployer/PROJECTNAME/shared/bundle 没有任何变化。奇怪的是,在 运行 另一个部署之后,它创建了 /home/deployer/PROJECTNAME/shared/bundle/ruby/2.3.0/bundler。看到2.3.0了吗?但是我安装的Ruby版本是2.3.1!

为什么它仍然会寻找错误版本的 rake?我真的不知道发生了什么。该死的吉姆,我是软件开发人员,不是系统管理员!

编辑: 我屈服了,实际上将 rake 版本 11.1.2 写入了 Gemfile。现在我收到相同的消息,但对于 activesupport:

Could not find activesupport-4.2.6 in any of the sources

WTF正在进行中?为什么所有这些旧版本?我不要他们!

我想我通过更新 react_on_rails gem 解决了这个问题。但这是货物崇拜计算。我从来没有发现为什么它会这样,我只是尝试了一些东西。我也删除了 tmp/cache.