cdpalmer cdpalmer - 1 month ago 53
Ruby Question

Could not verify the SSL certificate for https://rubygems.org/

I'm getting this error when I run

bundle install
:

Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For
information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.


However, it is only happening to one of my projects, and seems to be happening to only me. Also, I can get around it by running
bundle update
, where I don't get that error, and I can get up a running after that.

Is there something that isn't tracked in the project (that is only on my machine) that I have misconfigured?

Answer

Since I am using rbenv instead of rvm, I wasn't able to do most of the solutions online.

I was able to fix the issue by uninstalling and reinstalling openssl

All is well, but I am not exactly sure why.