def things_n_stuff

Adventures in Code

Outdated RVM and OpenSSL Certificate Errors - a PSA

A small public service announcement from the wee hours of the morning.

I was getting errors trying to bundle in applications for an odd error I’d never seen before:

1
 ERROR: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

So I tried to update my gems:

1
2
3
rvm gemset update
Running gem update for all rubies and gemsets.
Only 'do' action is allowed.

I’d never seen these before and was a bit perplexed. Luckily…

Simple cause, easy solution

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
If you’ve installed RVM, try this:

$ rvm -v
#=> rvm 1.23.4 (stable)... 
$ rvm osx-ssl-certs status all
#=> Certificates for...
$ rvm osx-ssl-certs update all
#=> Updating certificates...
That’s all that is needed to resolve the issue if you are using RVM (you must be using RVM version 1.19.1 or newer).

For more on the issue, see a discussion at add rvm osx-ssl-certs on GitHub.


#####Staying Healthy
In a year or two, the error may reappear, when the certificate files again become outdated. To keep the certificate files current, RVM offers an option to run a cron job that updates the certificate files daily.

$ sudo rvm osx-ssl-certs cron install

Reposted in entirety from the excellent original article, which you should check out anyway. The link includes info for rbenv, macports, older rubies, and associated issues.