when i execute following command
当我执行以下命令时
$ rvm --default use 1.9.2
$ ruby -v
i got following result:
我得到了以下结果:
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux]
i can't understand why is not
我不明白为什么没有。
ruby 1.9.2p0...
5 个解决方案
#1
5
If u installed correctly, most likely its is path problem.
如果安装正确,很可能是路径问题。
Solution 1: Manually add the ruby1.9.2.p0 path into ur $PATH
解决方案1:手动添加ruby1.9.2。p0路径进入你的$路径
Solution 2: Try run:
解决方案2:试着运行:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
#2
1
Type rvm info
.
区信息类型。
All paths should reflect rvm's installation in your home directory.
所有路径都应该反映rvm在主目录中的安装。
If not, odds are good you didn't follow the "Post Install" directions for rvm, and need to go through them, and the troubleshooting section that follows it.
如果没有,很有可能您没有遵循rvm的“后安装”说明,并且需要检查它们,以及随后的故障排除部分。
#3
1
Maybe you should to try
也许你应该试试
rvm reload
or try to type
或尝试类型
rvm info
hope that will help you
希望这对你有帮助
#4
0
Maybe you should invoke
也许你应该调用
rvm reload
or try to open up a new shell and then again
或者尝试打开一个新的壳,然后再打开
ruby -v
hope that works for you...
希望这对你有用……
#5
0
You can try running which ruby
to see where your ruby is running from. If you've set up your rvm correctly and followed all the steps, it should look something like /home/username/.rvm/rubies/ruby-1.9.2-p136/bin/ruby
. Also, make sure you added the line to your .bashrc file as specified in rvm-install notes.
您可以尝试运行哪个ruby来查看您的ruby从哪里运行。如果正确地设置了rvm并遵循了所有步骤,那么它应该类似于/home/username/.rvm/rubies/ruby-1.9.2-p136/bin/ruby。另外,请确保在rvm安装注释中指定的.bashrc文件中添加了该行。
I've found this rvm setup tutorial to work flawlessly on several different machines: http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you, including Ubuntu, Fedora, and even on a Mac (with a few adjustments).
我发现这个rvm设置教程可以在不同的机器上完美地工作:http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails和你,包括Ubuntu、Fedora,甚至在Mac上(只要做一些调整)。
#1
5
If u installed correctly, most likely its is path problem.
如果安装正确,很可能是路径问题。
Solution 1: Manually add the ruby1.9.2.p0 path into ur $PATH
解决方案1:手动添加ruby1.9.2。p0路径进入你的$路径
Solution 2: Try run:
解决方案2:试着运行:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
#2
1
Type rvm info
.
区信息类型。
All paths should reflect rvm's installation in your home directory.
所有路径都应该反映rvm在主目录中的安装。
If not, odds are good you didn't follow the "Post Install" directions for rvm, and need to go through them, and the troubleshooting section that follows it.
如果没有,很有可能您没有遵循rvm的“后安装”说明,并且需要检查它们,以及随后的故障排除部分。
#3
1
Maybe you should to try
也许你应该试试
rvm reload
or try to type
或尝试类型
rvm info
hope that will help you
希望这对你有帮助
#4
0
Maybe you should invoke
也许你应该调用
rvm reload
or try to open up a new shell and then again
或者尝试打开一个新的壳,然后再打开
ruby -v
hope that works for you...
希望这对你有用……
#5
0
You can try running which ruby
to see where your ruby is running from. If you've set up your rvm correctly and followed all the steps, it should look something like /home/username/.rvm/rubies/ruby-1.9.2-p136/bin/ruby
. Also, make sure you added the line to your .bashrc file as specified in rvm-install notes.
您可以尝试运行哪个ruby来查看您的ruby从哪里运行。如果正确地设置了rvm并遵循了所有步骤,那么它应该类似于/home/username/.rvm/rubies/ruby-1.9.2-p136/bin/ruby。另外,请确保在rvm安装注释中指定的.bashrc文件中添加了该行。
I've found this rvm setup tutorial to work flawlessly on several different machines: http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you, including Ubuntu, Fedora, and even on a Mac (with a few adjustments).
我发现这个rvm设置教程可以在不同的机器上完美地工作:http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails和你,包括Ubuntu、Fedora,甚至在Mac上(只要做一些调整)。