19

I'm thinking about using Ruby to write an installation script, but I'm not sure if all major versions of Mac OS X install it by default.

Which version(s) of Mac OS X have the Ruby interpreter installed by default?

8

The Ruby download page indicates that Tiger (10.4) and Leopard (10.5) both include Ruby. I can verify from machines in my own home that Lion (10.7), Mountain Lion (10.8), and Mavericks (10.9) all come with Ruby. I can't personally verify that Snow Leopard (10.6) contained Ruby, but it would be shocking if it was present in the previous and subsequent versions but not Snow Leopard.

If your target audience is people who bought their computers or upgraded their operating system on or after April 29, 2005, you should be safe using Ruby in your installer.

  • If you have a chance, could you post the version numbers for each OS? I know Mavericks switched from Ruby 1.8 to 2.0 as a default (although it includes both). – Alan Shutko Oct 31 '13 at 23:19
  • Snow Leopard does have Ruby on it. It has version 1.8.7 – addison Aug 4 '14 at 19:00
23
  • 10.14 ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
  • 10.13 ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
  • 10.12 ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
  • 10.11.2 ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]
  • 10.10.2 ruby 2.0.0p481 (2014-04-08 revision 45883) [universal.x86_64-darwin14]
  • 10.9.0: ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
  • 10.8.5: ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
  • 10.7.5: ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
  • I am trying to use newer version of ruby and not to overwrite the OSX's own ruby installation, what is the proper way to do that? I am getting a permission issue here when trying brenv. – hhh Jun 27 '17 at 14:25
  • Use Homebrew to install rbenv and then you can have any Ruby version in parallel. – goetzc Nov 13 '18 at 19:11
  • 1
    chruby is a non-invasive way to do this. – karmakaze Oct 12 at 19:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .