This error usually shows up when you try to run the following command:
sudo gem install
For those that don’t know what I am talking about, this is the error message:
ERROR: Loading command: install (LoadError) dlopen(/opt/local/lib/ruby2.2/2.2.0/x86_64-darwin15/openssl.bundle, 9): Symbol not found: _SSLv2_client_method Referenced from: /opt/local/lib/ruby2.2/2.2.0/x86_64-darwin15/openssl.bundle Expected in: /opt/local/lib/libssl.1.0.0.dylib in /opt/local/lib/ruby2.2/2.2.0/x86_64-darwin15/openssl.bundle - /opt/local/lib/ruby2.2/2.2.0/x86_64-darwin15/openssl.bundle
The only way to get this to go away is to re-compile ruby so it will use the new openSSL library. Macports, however, installs packages from binaries. So, after hours of trial and error, I found a way to get around this. You can re-install ruby with the following command and the error message will go away:
sudo port install ruby23 +mactk
You will have to replace ruby23 with whatever version you want to install.