【问题标题】:Downgrade rails gem with Rubber用橡胶降级导轨宝石
【发布时间】:2016-01-11 20:47:37
【问题描述】:

我有一个 Rails gem,由于新版本存在问题,我需要降级到旧版本:aws-sdk

我已经更新了本地 Gemfile 并推送到我的 git 服务器:

gem 'aws-sdk', '< 2.0'

现在,我需要使用降级的 gem 更新我的生产服务器,而不是它当前拥有的较新版本。

我尝试了cap deploy,但收到此错误:

 ** [out :: app01-myserver.com] You are trying to install in deployment mode after changing
 ** [out :: app01-myserver.com] 
 ** [out :: app01-myserver.com] your Gemfile. Run `bundle install` elsewhere and add the
 ** [out :: app01-myserver.com] 
 ** [out :: app01-myserver.com] updated Gemfile.lock to version control.
 ** [out :: app01-myserver.com] 
 ** [out :: app01-myserver.com] 
 ** [out :: app01-myserver.com] You have added to the Gemfile:
 ** [out :: app01-myserver.com] 
 ** [out :: app01-myserver.com] * aws-sdk (< 2.0)
 ** [out :: app01-myserver.com] 
 ** [out :: app01-myserver.com] You have deleted from the Gemfile:
 ** [out :: app01-myserver.com] * aws-sdk

那么,我可以从命令行运行 caprubber 命令来更新 Gemfile 吗?

【问题讨论】:

    标签: ruby-on-rails ruby git capistrano rubber


    【解决方案1】:

    如错误消息中所述,您应该将 Gemfile.lock 添加到 git。在它刚刚运行bundle update aws-sdk 之后,在Gemfile.lock 中提交更改,将其推送并使用cap 部署到生产服务器。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-05-27
      • 1970-01-01
      • 2012-12-17
      • 2018-11-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多