문제

I installed rvm and used it to install Ruby. According to rvm my current and default version is 2.1.0 however ruby -v gives me two options and neither is the version listed as the default by rvm. What am I missing?

Thanks in advance!

foo@ua41f725e9ecd517ff31d:~$ rvm list

rvm rubies

=* ruby-2.1.0 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

foo@ua41f725e9ecd517ff31d:~$ ruby -v
The program 'ruby' can be found in the following packages:
* ruby1.8
* ruby1.9.1
Try: sudo apt-get install <selected package>
도움이 되었습니까?

해결책

You need to make sure that the place where rvm installs the ruby binaries is in your $PATH.

Try adding the following to your .bashrc, .bash_profile, or .zshrc or whatever shell you are using.

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

다른 팁

The Ruby installed by rvm isn't in your PATH. That message you saw at the bottom was the system telling you it couldn't find any Ruby version. Be sure that rvm is setting your PATH up correctly.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top