learning_to_swim
learning_to_swim

Reputation: 361

Ruby - Version 2.0.0 installed using RVM but not showing under update-alternatives

I just installed ruby 2.0.0 using RVM.

u2@u2-VirtualBox:~/tools$ rvm use 2.0.0-p353 --default
Using /usr/local/rvm/gems/ruby-2.0.0-p353

but I am unable to see/set 2.0.0 as the default Ruby version using update-alternatives. Aptana is using version 1.9.1 as a result

u2@u2-VirtualBox:~/tools$ update-alternatives --config ruby
There are 2 choices for the alternative ruby (providing /usr/bin/ruby).

  Selection    Path                Priority   Status
------------------------------------------------------------
* 0            /usr/bin/ruby1.9.1   51        auto mode
  1            /usr/bin/ruby1.8     50        manual mode
  2            /usr/bin/ruby1.9.1   51        manual mode

Press enter to keep the current choice[*], or type selection number: 

Any help is sincerely appreciated.

Upvotes: 2

Views: 478

Answers (1)

Stefano Sanfilippo
Stefano Sanfilippo

Reputation: 33046

You have to register the installed version as an alternative provider for /usr/bin/ruby. Do it with:

sudo update-alternatives --install /usr/bin/ruby ruby /path/to/ruby/2.0/executable

Then, you can call update-alternatives --config ruby as usual.

Upvotes: 4

Related Questions