1

Im running Ubuntu 12.04 lts and have installed Ruby via RVM. Problem is when I just type ruby -v into the terminal it says that my Ruby Version is 1.8.7 and using the shotgun gem for Sinatra it replies back as well with saying that Im running ruby 1.8.7. Now when I type rvm list is shows that the only version of ruby that I have installed is 2.0.0 and it is my current and default version. I installed ruby 2.0.0 via rvm and is the only version I had installed on my machine. How do I know what version am I really on and how do I set 2.0.0 as my only version?

  • I am unable to install rails 4.0.0 due to ruby version not being 1.9 or higher. – Ordep81 Aug 30 '13 at 21:29
4

If you have installed two ruby version, like in your case you installed ruby 1.8.7 and ruby 2.0.0.

Now if you want to use ruby2.0.0 then type following command in your terminal:

rvm use 2.0.0

Then check ruby version by typing following command :

ruby -v

Now If you want to use ruby 1.8.7 then in use 1.8.7 instead of 2.0.0

If you want to install ruby1.9.3 then type following command in your terminal :

rvm install 1.9.3
  • with rvm how would you ensure that "rvm ruby" is being used? – Thufir Oct 28 '17 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.