How to upgrade Ruby patch level for 1.9.3 in RVM?

4.2k views Asked by At

Based on a previous StackOverflow question it looked like the correct way to upgrade Ruby to the latest patch level was this:

$ 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

However, this doesn't seem to work for me:

$ 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.

Is there a more appropriate way to upgrade Ruby versions with RVM?

2

There are 2 answers

0
at. On BEST ANSWER

Apparently I already had ruby 1.9.3-p194 installed, so I had both that and 1.9.3-p0. That's why the upgrade command was confusing. It won't upgrade 1.9.3-p0 if a newer version is already there...

2
mpapis On

First update RVM:

rvm get stable

Next upgrade ruby:

rvm upgrade 1.9.2

RVM will automatically detect existing version of 1.9.2 and will check if it is lower then highest available patchlevel:

  1. if update is possible it will continue
  2. if update is not possible it will report error