Does anyone know how to properly uninstall Ruby 1.8.7 and install Ruby 1.9.2 on Ubuntu 11.10?
I have thoroughly searched and none of the tutorials I've found have worked.
Also, I spent a very long time trying to get RVM to work and it just is a pain to use. Additionally, I will have little use for the older version.
Update outputs:
which ruby
:
/usr/local/bin/ruby
ls -l /usr/local/bin/ruby
:
lrwxrwxrwx 1 root root 16 2011-10-17 21:20 /usr/local/bin/ruby -> /usr/bin/ruby1.8
ls -l /etc/alternatives/ruby
:
lrwxrwxrwx 1 root root 18 2011-12-30 17:35 /etc/alternatives/ruby -> /usr/bin/ruby1.9.1
echo $PATH
:
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
By the way, when I look at --config gem, it tells me that there is only one gem, which is /usr/bin/gem1.9.1
Is there a problem with having both installed? And using the versions from the repositories? I would install ruby 1.9.2 with:
And then update the "alternatives" system to use ruby 1.9:
This will also set the alternatives for
erb
,irb
,rdoc
,ri
,testrb
and the man page. However you need to update the gem command separately:I know, it is confusingly called ruby1.9.1 rather than 1.9.2, some upstream debian packaging thing.
If there really is no reason to keep ruby1.8, I found it easier to remove as follows: