How to choose between two versions of ruby on Mac OSX Mavericks - ruby

I have 1.8 and 2.0 installed on my system. How I can delete the old one or Use the new one to work with gems?

Be sure to install RVM and then select version 2.0 like this:
rvm use 2.0.0
You can check which version is being used with
ruby -v

Related

MAMP Ruby vs macOS system Ruby

I am about to install a newer version of Ruby so I checked the following things-
Which ruby
/Applications/MAMP/Library/bin//ruby
ruby - v
2.6
I don't like to use Mamp ruby as I want to use a newer version of Ruby probably 2.7(as it supports the application)
Also when I do which ruby it doesn't show Mac ruby version.
Is it ok if I install a ruby version manager like chruby. Would it interfere with any other version.
Any help is highly appreciated.
Thank you.

RVM upgrade 2.5.0 issues

Hello I am currently using RVM version 1.29.3 and Ruby 2.4.2 and I am unable to upgrade to 2.4.3 or 2.5.0. When I run rvm upgrade 2.5.0, output is Are you sure you wish to upgrade from ruby-2.4.2 to ruby-2.4.1? (Y/n): which is obviously not what I want.
Often, new releases of Ruby are not available on stable versions of rvm, and if you want them you need to install the head. As previously stated, you can do rvm get head. New windows will use the new version of rvm but if you use a terminal window that was loaded before installing the new version of rvm, you'll need to do a rvm reload.
Then you should be able to rvm install 2.5.
(Do not then do rvm get stable because it will overwrite the head version.)

How can I use the latest version of Ruby by default?

I am on a Mac running OSX 10.11 El Capitan. I installed Ruby 2.3.1 via rvm. If I type in the terminal
ruby --version
It says that I am running 2.0.0
But if I type
rvm use 2.3.1
And then
ruby --version
It says that I am running 2.3.1
But next time I open terminal it goes back to 2.0.0
How can I use latest version of Ruby by default?
rvm --default use 2.3.1
Documentation here.
Make a .ruby-version file in a directory of your project and in it put ruby-3.2.1 or which ever version you want

(Mac Terminal) "System" message when trying to install latest ruby with RVM

I'm a total newbie when it comes to using Terminal, so I don't really understand what's happening here when I try to upgrade my ruby version (1.8.7) with rvm on a Mac OS X 10.7.3.
When I input
rvm install current && rvm use current
I get this
system
system
What does this mean? And how can I proceed with the installation of the latest version?
The current rvm command outputs the name of the currently active installation of Ruby; in this case, it's using your system's pre-installed Ruby (1.8.7).
Try this:
rvm install 2.0 # (or whatever version you need)
rvm use 2.0 --default # this sets the default to the 2.0 install

update ruby to 1.8.7

I'm working on a project that i have to use ruby 1.8.7. I'm using today, ruby 1.8.6 + Mac OSX Darwin. This ruby 1.8.6 was installed with the OS, it's a developer package from Apple. My question is: how can i update this package? if i run ports, it dont find my current installed package and install a new ruby version, with different paths and as effect it breaks my rubygems (i know how to fix it, but it is always workarounds over workarounds).
There is a clean way to update the default ruby that comes with the OS or its better to remove it and just manage it by Port? Please answer like this one How to update to Ruby 1.8.7 don't helps me
Have you tried rvm gem? It manages Ruby versions installed, allow to compile most (if not all) actual (and archival) Ruby versions, sets proper environment variables pointing to actually used ruby version.
$ gem install rvm
$ rvm install 1.8.7
$ rvm use 1.8.7 --default
On my OS X machines I have several versions of Ruby installed.
I install then, from source, under /usr/local/ruby-1.X.X
Once you have multiple versions of Ruby installed you will need your environment to know which one to use.
I do this by setting the PATH, like so
export PATH="/usr/local/ruby-1.8.7/bin:$PATH";
See Hive Logic's article on installing Ruby

Resources