3

根据之前的 StackOverflow 问题,将 Ruby 升级到最新补丁级别的正确方法是:

$ rvm upgrade 1.9.2 1.9.2-p0
Are you sure you wish to upgrade from ruby-1.9.2-p0 to ruby-1.9.2-p136? (Y/n): Y

但是,这似乎对我不起作用:

$ rvm upgrade 1.9.3 1.9.3-p0
Are you sure you wish to upgrade from ruby-1.9.3-p194 to ruby-1.9.3-p0? (Y/n): n
Cancelling upgrade.
$ rvm upgrade 1.9.3-p0 1.9.3
Are you sure you wish to upgrade from ruby-1.9.3-p194 to ruby-1.9.3-p194? (Y/n): n
Cancelling upgrade.
$ rvm upgrade 1.9.3-p0 1.9.3-p194
Are you sure you wish to upgrade from ruby-1.9.3-p194 to ruby-1.9.3-p194? (Y/n): n
Cancelling upgrade.
$ rvm upgrade 1.9.3-p194 1.9.3-p0
Are you sure you wish to upgrade from ruby-1.9.3-p194 to ruby-1.9.3-p0? (Y/n): n
Cancelling upgrade.

有没有更合适的方法来使用 RVM 升级 Ruby 版本?

4

2 回答 2

13

首先更新 RVM:

rvm get stable

下一次升级红宝石:

rvm upgrade 1.9.2

RVM 将自动检测 1.9.2 的现有版本,并检查它是否低于可用的最高补丁级别:

  1. 如果可以更新,它将继续
  2. 如果不能更新会报错
于 2012-06-05T18:50:24.037 回答
0

显然我已经安装了 ruby​​ 1.9.3-p194,所以我同时安装了 ruby​​ 和 1.9.3-p0。这就是升级命令令人困惑的原因。如果已经有更新的版本,它不会升级 1.9.3-p0...

于 2012-06-07T02:40:23.077 回答