Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

making ruby 1.9 default on os x [duplicate]

How do I make ruby 1.9 the default version to use instead of the 1.8.x that is by default installed on os x?

Thanks.

like image 326
chuck taylor Avatar asked Aug 15 '10 23:08

chuck taylor


People also ask

How do I change the default Ruby on Mac?

Set Ruby version with rvm on Mac To set a default Ruby version with rvm, enter rvm --default use 3.0. 0 on the command line. To switch to the system ruby, enter rvm use system . To switch back to the default, rvm default .

How do I know if Ruby is installed on my Mac?

Pre-installed macOS system Ruby MacOS comes with a “system Ruby” pre-installed. If you see /usr/bin/ruby when you use the which command, it is the pre-installed macOS system Ruby.


1 Answers

As of v2.1.3, the "correct" MacPorts way of setting a specific version of a package as the default is to use the select command, like this:

sudo port select --set ruby ruby19

There doesn't appear to be any documentation about this command in the MacPorts Guide. You can however run port help select to get a very limited description. This functionality replaces the +nosuffix "variant" style of setting the default version.

like image 96
beporter Avatar answered Sep 23 '22 17:09

beporter