【问题标题】:How to update ruby gem re-readline 5.0 to rb-readline 5.1如何将 ruby​​ gem re-readline 5.0 更新为 rb-readline 5.1
【发布时间】:2016-06-16 05:14:10
【问题描述】:

我正在研究 ruby​​ on rails,我想将 gem rb-readline 5.0 更新为 rb-readline 5.1 。我是这个领域的新手,想知道如何逐步更新这个单一的宝石。请帮助。

【问题讨论】:

  • 欢迎来到 SO!为了增加你的问题被回答的机会,我建议你问一个更具体的问题,包括你的代码和列出你尝试过的东西。参考this guide

标签: ruby ruby-on-rails-4 rubygems


【解决方案1】:

旁注rb-readline gem 既没有 5.0 也没有 5.1 版本。它是当前版本is 0.5.3。我假设你想升级到0.5.1


当前 gemset 更新(没有 Gemfile

如果你想升级到当前版本,很简单

gem update rb-readline
# update globally: 
# sudo gem -g update rb-readline

会的。如果要升级/降级到特定版本,这个过程有点棘手:

gem install rb-readline -v 0.5.1
# at this moment you have two different versions of gem installed
gem uninstall rb-readline -v 0.5.0

或者,也可以直接调用

gem uninstall rb-readline

调用交互式提示,询问要删除的版本。


导轨/Gemfile

在 Rails 中,项目根目录下通常有一个Gemfile。使用您喜欢的编辑器打开它,找到包含rb-readline 的行并将其更改为(或添加新行,如果它是隐式依赖项):

gem 'rb-readline', '~> 0.5', '= 0.5.1'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-24
    相关资源
    最近更新 更多