I recently got back into RoR development and found myself with an issue where I was unable to update any of my gems because of the following error:
Unable to download data from https://rubygems.org/ – SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
A temporary workaround I found was to just edit the individual rails projects gemfile and change the source from https to http. Now this obviously should not be the only solution and it seems to be an insecure solution. So I dug around a bit more and found another workaround/solution.
I have a Windows machine and use Bitnami for my installation since it was the most hassle free way of installing Rails on my system. In order to fix this problem, all I needed to do was manually install a certificate into my ruby installation folder.
You can download the certificate AddTrustExternalCARoot-2048Â or via this githubÂ linkÂ if you don’t trust me.
In most cases, Bitnami installs Ruby into the following location:
You will need to navigate to the following directory and paste the certificate you just downloaded into this folder:
(Obviously the folder location might be slightly different depending on your version of ruby.)
Paste the file in there and you should now be able to install your gems! It’s that simple.