[英]switch to ruby version installed through RVM
my macbook is OSX El Capitan. 我的Macbook是OSX El Capitan。 It has Apple pre-installed universal Ruby version 2.0.0 .
它已经预装了Apple通用Ruby版本2.0.0 。
Now, I want to use latest Ruby 2.3.0 . 现在,我想使用最新的Ruby 2.3.0 。 I managed to use rvm to install Ruby 2.3.0.
我设法使用rvm安装了Ruby 2.3.0。 I see the following message after rvm finished installing ruby 2.3.0:
rvm完成安装ruby 2.3.0后,我看到以下消息:
Ruby was built without documentation, to build it run: rvm docs generate-ri
/Users/John/.rvm/bin/rvm: line 66: shell_session_update: command not found
Creating alias default for ruby-2.3.0...
* To start using RVM you need to run `source /Users/John/.rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows.
I followed this message, & run command 我遵循此消息,并运行命令
source /Users/John/.rvm/scripts/rvm
but when I run ruby -v
, the version is still Apple pre-installed Ruby 2.0.0. 但是当我运行
ruby -v
,该版本仍然是Apple预装的Ruby 2.0.0。 How can I switch to the ruby I installed through rvm ? 如何切换到通过rvm安装的红宝石?
(under path .rvm/rubies
I can find ruby-2.3.0) (在路径
.rvm/rubies
下,我可以找到ruby-2.3.0)
To switch to using 2.3.0, do 要切换到使用2.3.0,请执行
rvm use 2.3.0
To make it default, do 要使其默认,请执行
rvm use --default 2.3.0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.