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?
1 Answer
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?– ThufirCommented Oct 28, 2017 at 14:30