Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default Ruby version on OSX Mountain Lion ? Still 1.8.x or 1.9.x?

What's the default Ruby version on OSX Mountain Lion ? Still 1.8.x or 1.9.x ?

like image 438
Jerome Avatar asked Aug 08 '12 14:08

Jerome


People also ask

Is Ruby installed on Mac by default?

First of all, Ruby is already pre-installed on your Mac. However, the pre-installed version is a few versions behind so we'll look into the other ways to install Ruby. Using a package management system makes your life easier when installing any software. On a Mac, you can use Homebrew to install newer versions of Ruby.

How do I choose Ruby version on Mac?

Set Ruby version with rvm on Mac 0 on the command line. To switch to the system ruby, enter rvm use system . To switch back to the default, rvm default . The command rvm list will show all installed Rubies, including the current and default versions.


2 Answers

On Mountain Lion, it is Ruby 1.8.7-p358 (Tested with OS X 10.8 and 10.8.3):

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.8.3
BuildVersion:   12D78
$ /usr/bin/ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
like image 162
Tammo Freese Avatar answered Oct 03 '22 06:10

Tammo Freese


On OS X 10.9.5, ruby is now 2.0!

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.9.5
BuildVersion:   13F34

$ /usr/bin/ruby --version
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin13]
like image 25
Mark Lanett Avatar answered Oct 03 '22 07:10

Mark Lanett