As mentioned previously, getting the latest version of Ruby on Ubuntu 11.10 is super easy. I hit a snag when 1.9.3 came out, though
$ rvm install 1.9.3 Installing Ruby from source to: /usr/share/ruby-rvm/rubies/ruby-1.9.3, this may take a while depending on your cpu(s)... ruby-1.9.3 - #fetching ruby-1.9.3 - #downloading ruby-1.9.3-, this may take a while depending on your connection... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0 curl: (78) RETR response: 550 ERROR: The requested url does not exist: 'ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-.tar.bz2' ...
That tarball is actually supposed to have a p0 on it, but rvm doesn't seem to think so. So let's fetch it ourselves and put it where rvm will find it.
curl -o /usr/share/ruby-rvm/archives/ruby-1.9.3-.tar.bz2 \ http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.bz2
Now rvm will do the install for us
$ rvm install 1.9.3 Installing Ruby from source to: /usr/share/ruby-rvm/rubies/ruby-1.9.3, this may take a while depending on your cpu(s)... ruby-1.9.3 - #fetching ruby-1.9.3 - #extracting ruby-1.9.3- to /usr/share/ruby-rvm/src/ruby-1.9.3 ruby-1.9.3 - #extracted to /usr/share/ruby-rvm/src/ruby-1.9.3 ruby-1.9.3 - #configuring
That way we can still manage it with rvm
$ rvm use 1.9.3 Using /usr/share/ruby-rvm/gems/ruby-1.9.3 $ rvm list rvm rubies => ruby-1.9.3 [ x86_64 ] ruby-1.9.2-p180 [ x86_64 ]
Note that ruby-1.9.3 is not called ruby-1.9.3-p0 as it probably should be. Ruby itself still has this information
$ ruby -v ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
but rvm has lost it. Maybe we were supposed to convince rvm to do the install with a -p0, rather than accommodating its need for a - with nothing after it?
Update: (16 Feb 2012) Ruby 1.9.3-p125 has been released. It seems to be packaged properly, so everyone should be able to just run
$ rvm install ruby-1.9.3-p125and have the updated Ruby install in one go. And new folks should just get the new one without any of the problems described above.