基于之前的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版本?
答案 0 :(得分:13)
首先更新RVM:
rvm get stable
下一次升级ruby:
rvm upgrade 1.9.2
RVM将自动检测现有版本的1.9.2,并检查它是否低于最高可用补丁级别:
答案 1 :(得分:0)
显然我已经安装了ruby 1.9.3-p194,所以我同时拥有它和1.9.3-p0。这就是升级命令令人困惑的原因。如果新版本已经存在,它将不会升级1.9.3-p0 ......