Cf. this StackOverflow answer:
brew install rbenv/tap/[email protected]
rvm reinstall 1.8.7-head --with-openssl-dir='/usr/local/Cellar/[email protected]/1.0.2t' \
--with-openssl-lib='/usr/local/Cellar/[email protected]/1.0.2t/lib' \
--with-openssl-include=/usr/local/Cellar/[email protected]/1.0.2t/include
rvm use 1.8.7
gem install bundler --version 1.3.6