David Winiecki
David Winiecki

Reputation: 4203

RVM treats new ruby like default ruby

I installed ruby 2.0.0 for the first time (probably with clang? on accident). Now RVM behaves like ruby 2.0.0 is the default ruby.

I have a .ruby-version with ruby 2.0.0 in a project directory. When I cd from that directory to my home directory, where there is no .ruby-version or .rvmrc, RVM did not switch my ruby back to the default 1.8.7-p370. Even more weird, when I switched from a different project using 1.9.3 to my home directory, rvm switched the ruby from 1.9.3 to 2.0.0.

Yet when I use rvm list, the ruby marked as the default (with an asterisk) is still 1.8.7-p370.

How can I make 1.8.7 the default again?

Alternate titles:

RVM does not switch to the default ruby

RVM not switching to the default ruby

Upvotes: 0

Views: 56

Answers (2)

mpapis
mpapis

Reputation: 53158

RVM makes the first installed ruby the default one, if this is not desired behavior just remove the default alias:

rvm alias delete default

and there will be no default ruby, alternatively set other ruby as default:

rvm use 1.9.3 --default #OR:
rvm alias create default 1.9.3

Upvotes: 1

David Winiecki
David Winiecki

Reputation: 4203

The same way you set the default when RVM is behaving normally:

rvm --default use 1.8.7

Upvotes: 0

Related Questions