- First off all make sure, that you've installed XCode and Homebrew.
- Install
openssl
andlibyaml
usingbrew
:
brew update && brew install openssl libyaml
- After that you can install
rbenv
:
brew install rbenv ruby-build
- Now install a old version of GCC to compile Ruby 1.8.7:
brew tap homebrew/dupes && brew install homebrew/versions/gcc47
- Now you can install Ruby using rbenv:
CC=gcc-4.7 rbenv install 1.8.7-p375