[Updated for Ruby 2.0.0-rc1 on 10 January 2013]
My first attempts at installing failed (quietly). Things seemed to
work, but I found this in the
Noticed this while compiling:"Ignore OpenSSL broken by Apple.Please use another openssl."ಠ_ಠ— Clint Shryock (@ctshryock) November 2, 2012
OS X ships with an older version of OpenSSL. Even in Mountain Lion. Homebrew makes it easy to install a new version, but does so cautiously; after you install OpenSSL, Homebrew displays a message detailing that it did not automatically link it. I chose to link it, but as a result I went and recompiled all of my rubies with rbenv and the new OpenSSL. You may or may not need to do this. It may or may not break other things. Be warned.
I assuming you’re using rbenv, Homebrew, and an updated OpenSSL.
. You need to set the
1 make install
flag to install it along your other rbenv rubies:
~❯ cd ~/Downloads/ruby-2.0.0-rc1 ruby-2.0.0-rc1 ❯ ./configure --prefix=$HOME/.rbenv/versions/2.0.0-rc1 checking build system type... x86_64-apple-darwin12.2.0 ... ... config.status: creating ruby-2.0.pc ruby-2.0.0-rc1 ❯ make ... ... Elapsed: 0.1s ruby-2.0.0-rc1 ❯ make install ... ... ruby-2.0.0-rc1 ❯
You can now use Ruby 2.0 via rbenv:
1 2 3 ruby-2.0.0-rc1 ❯ rbenv local 2.0.0-rc1 ruby-2.0.0-rc1 ❯ ruby -v ruby 2.0.0dev (2013-01-07 trunk 38733) [x86_64-darwin12.2.1]