1
OS: Mac Catalina 15.5.5
Ruby: 2.7.1
Rails: 6.0.2.2

I was trying to uninstall the MySQL Gem and re-install it:

gem uninstall mysql2

Response:

Successfully uninstalled mysql2-0.5.3


brew upgrade openssl

Response:

openssl 1.1.1g already installed


gem install mysql2 -v 0.5.3 -- --with-opt-dir="$(brew --prefix openssl)"

Response:

ERROR:  Could not find a valid gem 'mysql2' (= 0.5.3), here is why:
      Unable to download data from https://rubygems.org/ - SSL_connect SYSCALL returned=5 errno=0 state=SSLv3/TLS write client hello (https://rubygems.org/specs.4.8.gz)

This is not just for the MySQL gem. I tried creating a new Rails app, and when it tries to do the bundle, I get the same error about nor being able to access rubygems.org

Any ideas?

Solution:

Turns out it's a problem with the Kaspersky Internet Protection product. Out of the blue, it updated and decided to start blocking https connections. I've had so many problems with this product and regret having it installed, but don't think I can be without malware protection.

EastsideDev
  • 6,257
  • 9
  • 59
  • 116
  • 1
    This is an issue negotiating an SSL connection with rubygems.org (see this [question](https://stackoverflow.com/questions/25814210/opensslsslsslerror-ssl-connect-syscall-returned-5-errno-0-state-sslv3-read) as possibly relevant). Did you install your ruby version via rbenv/rvm? At a guess, ``gem`` might link to an older version of ``libssl``. Updating/rebuilding ruby with 1.1.1g might resolve. – rmlockerd Jul 16 '20 at 20:57
  • I've seen this already and it did not help solve the problem – EastsideDev Jul 16 '20 at 22:28

0 Answers0