[Ruby FAQs] Cannot install Ruby versions < 2.4 because of [email protected] dependency
openssl
The problem seems to be that homebrew
upgraded their openssl install to 1.1
. That version of openssl won’t work with rubies prior to 2.4.x
. This problem was probably introduced to your Mac when you upgraded homebrew.
1 | /Users/cloudolife/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- openssl (LoadError) |
Check the current openssl version.
1 | ls -ls /usr/local/opt/openssl |
My work around was to install the older version of openssl (from of all places a tap by rbenv), then reinstall ruby version.
Downgrade OpenSSL
First, Install or downgrade to [email protected]
.
1 | Install older [email protected] |
Check [email protected]
.
1 | ls /usr/local/Cellar/[email protected]/1.0.2t |
Reinstall Ruby
Then reinstall that ruby version with [email protected]
like this:
1 | asdf |
Or Upgrade Ruby
Or install ruby 2.4(+) version directly compatible with [email protected]
.