rvm get stable && rvm reload
Firstly, the OpenSSL comes with your OSX 10.8+ is outdated, you need to get latest version
rvm pkg install openssl
Secondly, the readline library on OSX 10.8+ suffers UTF-8 issue in which method in UTF-8 is converted to characters, the fix is to use latest version
rvm pkg install readline
Please note that clang-425.0.24
that comes with Xcode does NOT successfully compile the source, and you'll bump into this error:
Last 10 log lines:
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
regparse.c:582:15: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
return t->num_entries;
~~~~~~ ~~~^~~~~~~~~~~
1 error generated.
make: *** [regparse.o] Error 1
here is the fix:
export CFLAGS=-Wno-error=shorten-64-to-32
rvm reinstall 1.9.3 --with-readline-dir=$rvm_path/usr --with-openssl-dir=$rvm_path/usr
Make sure your ruby-build
is up-to-date:
cd ~/.rbenv/plugins/ruby-build && git pull
rbenv does not fetch fixed readline lib or openssl, thus you are required to install them manually with brew
:
brew update
brew install readline openssl
export CFLAGS=-Wno-error=shorten-64-to-32
env CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline` --with-openssl-dir=`brew --prefix openssl`" rbenv install 1.9.3-p392
@kevinSuttle: this is not for 2.0.0-p0, please see my other gist https://gist.github.com/joneslee85/5025635