Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which ruby version is installed?

Sounds strange but I cannot tell which ruby version is installed. If I do

rvm rubies

I get

ruby-1.9.2-p180 [ i686 ]

but with

ruby -v

I get

ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]

When trying to

rvm upgrade 1.8.7-p302 1.9.2-p180

I get an error

ERROR: Ruby 'ruby-1.8.7-p302' is not installed - please install it first.
ERROR: Error migrating gems.

So, which one is it? 1.8.7-p302 or 1.9.2-p180 ???

Please help me out here! Thanks

like image 578
EasierSaidThanDone Avatar asked Sep 04 '25 03:09

EasierSaidThanDone


1 Answers

You get 1.8.7 from the installed version of your system. Use rvm use --default 1.9.2 in order to set the Ruby installed via rvm as default.

RVM basically changes your $PATH variable to point to a different Ruby version than the one installed on your system.

Please also make sure that you have done steps 2 and 3 of the installation guide and confirmed that RVM is correctly set up.

like image 61
halfdan Avatar answered Sep 05 '25 22:09

halfdan