Leon Xiong
Leon Xiong

Reputation: 4391

Ruby 2.0.0 on Mac OS disappeared after Installing Ruby 2.4.0 by rvm

I'm using mac, and Ruby 2.0.0 had been built in within Mac OS.

I used rvm to install new version of Ruby, because I had heart that rvm could keep different versions of Ruby in computers and could well manage them.

I used the command to install Ruby 2.4.0:

$ rvm install 2.4.0 --disable-binary

Then check the Ruby versions kept by rvm :

$ rvm list

rvm rubies

=* ruby-2.4.0 [ x86_64 ]

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

There was only one version listed. Only Ruby 2.4.0.

The Ruby 2.0.0 was not displayed. Why?


The Ruby 2.4.0 can be found by which ruby: ~/.rvm/rubies/ruby-2.4.0/bin/ruby

But I can find that the /library/Ruby contain the Ruby 2.0.0, it exists in my computer.

Why Ruby 2.0.0 is not displayed by rvm?

Upvotes: 0

Views: 118

Answers (2)

Cameron Roe
Cameron Roe

Reputation: 290

rvm list does not display the system Ruby version in the list. That command only displays the Ruby versions that were installed through RVM. If you want to switch back to the system version of Ruby, run the command rvm use system. After running that command, ruby -v should display that it is version 2.0.0.

Upvotes: 1

Glyoko
Glyoko

Reputation: 2090

rvm list shows you the list of rubies you've installed through rvm, but doesn't say anything about your system ruby. If you want to use your system ruby, try rvm use system, and then which ruby to confirm that you're using /usr/bin/ruby.

Upvotes: 2

Related Questions