I was getting the following error while installing puma gem
$ gem install puma Fetching: puma-2.11.2.gem (100%) Building native extensions. This coul
Run brew info openssl
and follow the instructions there. Do not try to --force
link the latest openssl with the one that comes installed with OSX by default. (0.9.8)
Specifically it'll ask you to add the Homebrew version of openssl (should be 1.0.2 as of this date) into your $PATH.
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
Note: Make sure to remove any export PATH
lines from the bash_profile, since this line above exports it for you appending the rest of the $PATH variable to the end. To view the bash profile use vi ~/.bash_profile
This fixed the problems for installing ruby gems that require compilation. (Puma in this case)