Skip to content

Instantly share code, notes, and snippets.

@mgraupner
Last active December 15, 2015 07:38
Show Gist options
  • Save mgraupner/5224456 to your computer and use it in GitHub Desktop.
Save mgraupner/5224456 to your computer and use it in GitHub Desktop.
MacOS X Mountain Lion 10.8: Installing Ruby 2.0 and Gems with rbenv
As an update to my former gist: https://gist.github.com/michaelsd/1859298
I tried updating to ruby 2.0 and again there were some obstacles to overcome:
After using my previous tutorial i got the following error when updating gems
cannot load such file -- openssl
I found many sites with possible solutions, but the ultimate tip i found here
http://apple.stackexchange.com/questions/83722/ruby-2-0-0-fails-to-install-because-of-openssl
"The configure script will say that --with-openssl-dir is an invalid option. It's lying."
So here are my steps: (See former gists for details)
Install a new openssl version via brew: brew install opensll
Set the openssl directory via configure (get the directory via 'brew --prefix openssl')
./configure --prefix=$HOME/.rbenv/versions/1.9.3-p125 --with-gcc=clang --with-opt-dir=/usr/local/ --with-openssl-dir=/usr/local/opt/openssl
configure will tell you 'configure: WARNING: unrecognized options: --with-openssl-dir' twice but will recognize it anyways!
I also tried setting
CONFIGURE_OPTS
and
RUBY_CONFIGURE_OPTS
to
"--with-openssl-dir=`brew --prefix openssl`"
but i got the following message during make:
configuring openssl
Ignore OpenSSL broken by Apple.
Please use another openssl. (e.g. using `configure --with-openssl-dir=/path/to/openssl')
Failed to configure openssl. It will not be installed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment