Using RVM, but cannot install the current version of Ruby (Ubuntu 11.10)

I recently installed RVM on a new installation of Ubuntu 11.10 and cannot decide how to start using a particular ruby โ€‹โ€‹version.

I installed Ruby 1.8.7 and 1.9.2, and they appear in the list in order:

$ rvm list rvm rubies ruby-1.8.7-p352 [ i386 ] ruby-1.9.2-p290 [ i386 ] 

When I try to use the "use" command, everything looks fine:

 $ rvm use 1.9.2 Using /usr/share/ruby-rvm/gems/ruby-1.9.2-p290 Running /usr/share/ruby-rvm/hooks/after_use 

But then, when I test the current ruby โ€‹โ€‹version, I get the usual Ubuntu 11.10 message that you get when you donโ€™t have RVM at all:

 $ ruby -v The program 'ruby' can be found in the following packages: * ruby1.8 * ruby1.9.1 Try: sudo apt-get install <selected package> 

What am I doing wrong? Am I missing a step in installing RVM or something like that?

EDIT *

Answers to some comments:

 $ which ruby #returns nothing at all. $ which rvm /usr/bin/rvm $ rvm -v rvm 1.6.9 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/] $ echo $PATH /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games 
+8
ruby rvm
source share
4 answers

RVM 1.6.9 is now very old. Did you install it through the package manager? If so, get rid of it and run the following in your bash shell:

curl -L https://get.rvm.io | bash -s stable

Then put [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" in ~/.profile OR ~/.bash_profile OR ~/.bashrc

Then you can run type rvm | head -n 1 type rvm | head -n 1 , and he should say: "rvm is a function."

Then you can install rubies and use one of them. Be sure to use --default for this Ruby to stay the default even after ending a terminal session. For example. rvm use ruby-1.9.2-p290 --default

+9
source share

Have you added the following line to .bash_profile ,

 [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" 

as the page for rvm says?

+1
source share

Like tass, you obviously have a different rvm directory, then $ HOME / .rvm, so

 [[ -s "/usr/share/ruby-rvm/scripts/rvm" ]] && . "/usr/share/ruby-rvm/scripts/rvm" 

probably what you would like to use instead

+1
source share

I know that this thread is zombie-old, but in the settings of your client terminal the check "start command as an input shell" solved it for me. RVM usually puts this line in your ~ / .bash_profile for you.

+1
source share

All Articles