Installing older ruby versions via rvm on mac 10.10
If you are installing 2.1.x or 2.2.x versions of ruby from 2014/2015, support is missing for some of them.
gem install
stops working with the default gem that installs via rvm
when installed on Mac OS X 10.10 (OS X Yosemite)
This is the error I faced. You get the error
ERROR: Could not find a valid gem 'rubocop' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/latest_specs.4.8.gz)
This worked for me
curl https://curl.haxx.se/ca/cacert.pem > /usr/local/etc/openssl/cert.pem
(found via https://github.com/rubygems/rubygems/issues/1800#issuecomment-270617750)
There are a series of steps here which you may want to try out. http://railsapps.github.io/openssl-certificate-verify-failed.html
These steps did not work for me
There is a suggestion to upgrade to the latest ruby gems by installing it from local after downloading. This results in the following error.
ERROR: SSL verification error at depth 2: certificate has expired (10)
ERROR: Certificate /C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA expired at 2014-01-28T12:00:00Z
ERROR: SSL verification error at depth 2: certificate has expired (10)
ERROR: Certificate /C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA expired at 2014-01-28T12:00:00Z
ERROR: SSL verification error at depth 2: certificate has expired (10)
ERROR: Certificate /C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA expired at 2014-01-28T12:00:00Z
ERROR: Could not find a valid gem 'rubocop' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
ERROR: SSL verification error at depth 2: certificate has expired (10)
ERROR: Certificate /C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA expired at 2014-01-28T12:00:00Z
installing via rvm
was suggested too - rvm install 2.1.2 --disable-binary
. It did not work.