How to associate a new rvm installation with existing ruby ​​versions?

I had a problem with RVM, so I uninstalled and reinstalled it.

The truth is that I actually tried rbenv, but it did not work for me, so I try to start rvm again and run it - without having to install duplicate versions of Ruby.

I have at least one existing version of Ruby installed:

ruby --version ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0] 

But when I do rvm list , I get an empty list:

 bash-3.2$ rvm list rvm rubies # Default ruby not set. Try 'rvm alias create default <ruby>'. # => - current # =* - current && default # * - default 

So my question has two parts:

  • How do I see all versions of Ruby on my system (given that rvm is not showing me)?
  • How to associate a new RVM installation with existing versions of Ruby?

Or am I better off uninstalling all existing versions of Ruby and reinstalling everything? It looks like a pain in the ass, though.

+5
source share
2 answers

You can add an existing ruby ​​to rvm using:

 rvm mount /path/to/ruby 

or

 rvm automount 

but be careful, since the ruby ​​installed in the system can have hard-coded paths for precious stones - therefore gemsets will not work with it.

There is also a new way to add binary rubies (already compiled) for a list of available builds to run your platform:

 rvm list remote 

and you can set these rubies using:

 rvm mount -r 1.9.3 

This may be the default way to install ruby ​​to avoid compiling in the next stable version of RVM, but it will only work for ruby ​​1.9.3 +.

+8
source

You do not want to bind RVM with existing Ruby, you just want to install new Ruby.

You also do not want to remove the Ruby system; OS X depends on it.

Install the new 1.8.7 under rvm, so you can associate your own gems with it. While OS X controls the default Ruby system, you simply ignore it and use your own, exclusively controlled by rvm.

(If you decide to go the rvm route.)

+3
source

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


All Articles