5

I have ruby version 2.1.5 installed on my system.

On running bundle install, I am getting "Could not load OpenSSL. You must recompile Ruby with OpenSSL support or change the sources in your Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using RVM are available at http://rvm.io/packages/openssl."

My Gemfile has soures with http only.

On executing "rvm pkg install openssl" : ==> Formulae curl-openssl glib-openssl [email protected] ✔ homebrew/portable-ruby/portable-openssl

There is no [email protected] and openssl

How to degrade to [email protected] from 1.0.

Already tried rvm reinstall 2.1.5 --with-openssl-dir=brew --prefix [email protected] But it is of no use for me.

3
  • 2.1.5 is no longer supported so it could take some trickery to get it working. Only 2.4 through 2.6 are currently maintained. Is there anything preventing upgrading? Ruby's been pretty good lately and there's usually no serious surprises. OpenSSL itself has had some severe security issues that make running older versions highly risky.
    – tadman
    Commented Dec 4, 2019 at 1:30
  • yes, actually we are not planning to upgrade it yet.
    – RB19
    Commented Dec 4, 2019 at 5:08
  • See OpenSSL 1.0.2m on macOS
    – Cœur
    Commented Dec 29, 2019 at 2:24

3 Answers 3

5

The previous solution doesn't work any more, I have succeeded with the following steps:

brew install rbenv/tap/[email protected]
ln -sfn /usr/local/Cellar/[email protected]/1.0.2t /usr/local/opt/openssl
1
  • Doesn't directly solve my issue, but give me an idea of what is going on and able to fix it, thanks Gong Pengjun Commented Jun 1 at 15:15
2

I've seen this issue on rvm project where you can find more detail about this.

This step works for me, we have to wait for some official fix.

  1. Install openssl via rvm pkg install openssl
  2. Remove and reinstall rubies with rvm reinstall 2.1.5 --with-openssl-dir=$HOME/.rvm/usr
0
1

I have tried the solution on Mac OS X Catalina and it works.

  1. Download the file: https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
  2. Run brew with the file downloaded:
    brew install openssl.rb

Not the answer you're looking for? Browse other questions tagged or ask your own question.