To avoid OpenSSL segfaults, link ruby against macports' OpenSSL in /opt/local
.
Before you install Ruby, make sure you have MacPorts installed for Mountain Lion.
$ CONFIGURE_OPTS="--with-openssl-dir=/opt/local" rbenv install 1.9.3-p194
Downloading http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz...
Installing yaml-0.1.4...
Installed yaml-0.1.4 to /Users/jeff/.rbenv/versions/1.9.3-p194
Downloading http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz...
Installing ruby-1.9.3-p194...
Installed ruby-1.9.3-p194 to /Users/jeff/.rbenv/versions/1.9.3-p194
rbenv with a quick way to get gemsets.
export CC=/opt/local/bin/gcc-apple-4.2
./configure --prefix=${HOME}/.rbenv/versions/1.8.7-p358 \
--enable-pthread \
--enable-shared
export GEM_HOME="${HOME}/.rbenv/versions/1.8.7-p358/gemsets/development"
export GEM_PATH="${HOME}/.rbenv/versions/1.8.7-p358/gemsets/development:${HOME}/.rbenv/versions/1.8.7-p358/gemsets/global"
export PATH="${GEM_HOME}/bin:${PATH}"