Installing openssl in ruby / rbenv
For Mac OSX this is what saved me:
RUBY_CONFIGURE_OPTS=--with-openssl-dir=<openssl install dir> rbenv install
From the Ruby build wiki
But.. how to find the openssl install dir?:
$ brew list openssl/usr/local/Cellar/openssl/1.0.2d_1/bin/c_rehash/usr/local/Cellar/openssl/1.0.2d_1/bin/openssl...
Then the openssl install dir is:
/usr/local/Cellar/openssl/1.0.2d_1/
And the ruby installation command ends as this:
RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl/1.0.2d_1/ rbenv install