Why do I need to use "rvm use default" after opening a new terminal window?

When I open a new terminal window (Mac OSX 10.7.2) and enter rails , I get the always funny message "rails is not installed ...", but I enter rvm use default 1.9.2 and everything is fine with the world.

Where am I wrong?

+6
source share
1 answer

Zabba is right in the comments when he says that the correct command to use is rvm use 1.9.2 --default .

RVM considers default be Ruby, equivalent to the Ruby standard. If I rvm use default in my terminal, I get this output:

 $ rvm use default Using /Users/tom/.rvm/gems/ruby-1.9.3-p0 

However, it is possible to list several rubies in your rvm use call, for example:

 $ rvm use 1.9.3 system Now using system ruby. $ rvm use system 1.9.3 Using /Users/tom/.rvm/gems/ruby-1.9.3-p0 

Although I'm not quite sure if this is a function (or a specific use case for passing multiple Rubies, since RVM does not seem to return to another Ruby listed if it is not installed), it means that when you type rvm use default 1.9.2 instead of setting By default, 1.9.2 you say that RVM uses 1.9.2, since this is the last Ruby specified in the command.

If you run the rvm use 1.9.2 --default once, you will use 1.9.2 in every terminal that opens.

NB in ​​a function with multiple arguments-rvm: I know that you can pass multiple Rubies to the RVM command to run a script with multiple versions of Ruby, but I do not see RVM installing two versions of Ruby to run immediately.

+12
source

Source: https://habr.com/ru/post/900880/


All Articles