简体   繁体   中英

Installed RVM and tried to switch ruby version but no go

mlanza@mlanza-desktop:~$ rvm use 1.9.2
Using /home/mlanza/.rvm/gems/ruby-1.9.2-p180
mlanza@mlanza-desktop:~$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]

This is on Ubuntu 10.4 where 1.8.7 was already installed. Does RVM require that all Ruby versions be installed by it?

Do I have to set a PATH variable in my .bashrc?

mlanza@mlanza-desktop:~$ rvm rvmrc trust
Marked /home/mlanza/.rvmrc as trusted
mlanza@mlanza-desktop:~$ [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
mlanza@mlanza-desktop:~$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]

Make sure that

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

is the last thing in your ~/.bashrc file.

Also, reading the " Post install " docs might help, especially the troubleshooting section. However, usually we see people haven't added the above line to their startup script, or they've forgotten to set the default Ruby:

rvm use 1.9.2 --default

RVM doesn't require or expect that all Rubies on your system are under its control. Mac OS X includes Ruby for its own purposes, and RVM allows it to be used by issuing rvm use system . At that point RVM steps out of the way until you tell it to use one of its managed Rubies.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM