Setup RVM, Ruby on Mac OS X Sierra: Unable to require openssl
Well I found a solution to the problem previously described. The following steps outline how it was resolved.
CleanUp
Removed the installation of Homebrew via
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Removed the installation of RVM via
rvm implode
Rebuild
Install Homebrew using
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Do integrity check on Brew using
brew upgrade
followed bybrew doctor
- Install RVM (again!) using
\curl -sSL https://get.rvm.io | bash -s stable
- Ensure that RVM knows about homebrew through the
autolibs
option usingrvm autolibs homebrew
Setup the environment variables so that we know where the openssl is installed:
export LDFLAGS=-L/usr/local/opt/openssl/lib
export CPPFLAGS=-I/usr/local/opt/openssl/include
export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
Install ruby via
rvm install 2.3.3 --autolibs=homebrew
Check that it Works
Check that the rvm space knows about the OpenSSL certificates using
rvm osx-ssl-certs status all
. Running this command produced the following output:Certificates for /usr/local/etc/openssl/cert.pem: Up to date.
Install rails via
gem install rails
At the last step the installation succeeded and Rails was working (at last!)