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.
Thanks for the guide :D
Posted by: Brandon Shutter | 01/28/2012 at 01:57 PM
Sure thing! Have fun with Ruby 1.9.3!
Posted by: oylenshpeegul | 01/29/2012 at 07:01 AM
Thank you, it was useful for me
Posted by: SeverineDarlot | 02/23/2012 at 06:11 AM
it would worked better if you use sudo rvm install ruby-1.9.3-p125 on ubuntu 11.10 it would work than installing it manually.
Posted by: Arosas_zero | 02/27/2012 at 08:50 PM
Thanks for the post.
I installed ruby-1.9.3-p125.
"rvm use 1.9.3" not working for me.
I need to provide patch with version to switch
means "rvm use 1.9.3-p125" only working.
Why is it so?
Posted by: Account Deleted | 02/28/2012 at 09:31 PM
Huh. I don't know. I have to say "rvm use 1.9.3-p125" too, but I assumed that was because I had more than one (when I say "rvm use 1.9.3", I get 1.9.3-p0).
Posted by: oylenshpeegul | 03/07/2012 at 08:54 AM
You rock, good work!
Posted by: Michael Grech | 03/25/2012 at 11:16 AM
Thanks, this worked perfectly!
Posted by: InsideOutCloud | 03/28/2012 at 09:16 AM