Leem.fin Leem.fin - 1 year ago 95
Ruby Question

switch to ruby version installed through RVM

my macbook is OSX EI Capitan. It has Apple pre-installed universal Ruby version 2.0.0.

Now, I want to use latest Ruby 2.3.0. I managed to use rvm to install Ruby 2.3.0. I see the following message after rvm finished installing 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. How can I switch to the ruby I installed through rvm?

(under path
I can find ruby-2.3.0)

Answer Source

To switch to using 2.3.0, do

rvm use 2.3.0

To make it default, do

rvm use --default 2.3.0
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download