RVM default ruby not getting set


Yesterday I installed RVM and also installed ruby 1.9.1

rvm use 1.9.2

When I use this comand , rvm wasn’t failing, It was always reverted back to system ruby (1.8.7 ).

Like,
sathia@sathia27 ~ $ rvm –default 1.9.2-p180
sathia@sathia27 ~ $ ruby -v
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux]
Then after relaoding .basrc file , My problem was solved.
 $ sudo touch .bashrc (if .bashrc not found)

 $ sudo gedit .bashrc

(Add the following line into .bashrc file)

 if [[ -s "$HOME/.rvm/scripts/rvm" ]]  ; then source "$HOME/.rvm/scripts/rvm" ; fi
Then use
sathia@sathia27 ~ $ rvm use 1.9.2
Using /home/sathia/.rvm/gems/ruby-1.9.2-p180
sathia@sathia27 ~ $ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
It should works 🙂
Advertisements

About sathia

Web developer at cloudmint
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s