I know how to use RVM, but now I have a weird problem, which I do not understand why.
Here is the simple story (I am using Ubuntu):
I have created a Rails project, the direcotry of this project is "bookstore/".
I go to project directory by cd bookstore
, and type command rvm list
like following:
bookstore/$ rvm list
rvm rubies
ruby-1.9.2-p136 [ i386 ]
ruby-1.8.7-p352 [ i386 ]
ruby-1.8.7-p330 [ i386 ]
ruby-1.8.6-p420 [ i386 ]
ruby-1.9.2-p290 [ i386 ]
Since I did not see the =>
arrow sign which is supposed to indicate the current ruby version in use, so I specify the ruby version with the following RVM command:
bookstore/$ rvm use ruby-1.9.2-p290
Using /home/usr/.rvm/gems/ruby-1.9.2-p290
Now, if I rvm list
I see my project is using ruby v1.9.2 :
bookstore/$ rvm list
rvm rubies
ruby-1.9.2-p136 [ i386 ]
ruby-1.8.7-p352 [ i386 ]
ruby-1.8.7-p330 [ i386 ]
ruby-1.8.6-p420 [ i386 ]
=> ruby-1.9.2-p290 [ i386 ]
Every thing works fine at this point!
But, if now I open a new terminal window on Ubuntu, and cd
to the project directory, and run the command rvm list
again, I got:
bookstore/$ rvm list
rvm rubies
ruby-1.9.2-p136 [ i386 ]
ruby-1.8.7-p352 [ i386 ]
ruby-1.8.7-p330 [ i386 ]
ruby-1.8.6-p420 [ i386 ]
ruby-1.9.2-p290 [ i386 ]
Where is the =>
to indicate the ruby version I specified previously? Why it again needs me to specify the ruby version?
It happens always when I open a new terminal window. How to have my project "remember" the ruby version I have specified?