a
Course Image

Ruby OpenSSL Not Found on Catalina MacOS

Joel Garcia Joel Garcia has been building AllCode since 2015. He’s an innovative, hands-on executive with a proven record of designing, developing, and operating Software-as-a-Service (SaaS), mobile, and desktop solutions. Joel has expertise in HealthTech, VoIP, and cloud-based solutions. Joel has experience scaling multiple start-ups for successful exits to IMS Health and Golden Gate Capital, […]

After upgrading to Catalina on my Mac, I realized that I was unable to install a new version of Ruby using RVM without encountering OpenSSL errors. This turned into a full fledged nightmare for a couple of clients’ source code who leverage old versions of Ruby.

If you’ve encountered issues with RVM, Ruby, Mac OSX, OpenSSL, nokogiri, V8, and therubyracer, and you only want to see the solution, click here.

This article assumes that you know to avoid using the version of Ruby bundled with Mac OS X. Instead, you should install your own version of Ruby with RVM, the Ruby Version Manager.

Prior versions of MacOS provided openssl-0.9.8 until the High Sierra release. Now, in MacOS 10.15.2, it’s LibreSSL. I have no idea why MacOS changed from OpenSSL to LibreSSL.
To see what eversion of OpenSSL is on your Mac, type the following command:

$ openssl version -a
LibreSSL 2.8.3

To install the latest version of ruby-2.3.4, I take the following steps from the terminal prompt

$ rvm get master
$ rvm cleanup all
$ rvm install ruby-2.3.4
$ rvm use ruby-2.3.4
$ cd {app_folder}
$ bundle install

First, I encountered problems installing nokogiri-1.8.4. The error logs stated.

conftest.c:3:10: fatal error: 'libxml/xmlversion.h' file not found
#include <libxml/xmlversion.h>
         ^~~~~~~~~~~~~~~~~~~~~
1 error generated.

After googling around, I uncovered that building nokogiri with the system libraries might be beneficial

gem install nokogiri -- --use-system-libraries=true --with-xml2-include="$(xcrun --show-sdk-path)"/usr/include/libxml2

I then ran into issues with OpenSSL that prompted me to try

$ rvm pkg install openssl

The install openssl command failed with .rvm/log/1594962591/openssl_make.install.log,

/bin/sh: /Users/joelgarcia/.rvm/usr/ssl/man/man3/hmac.3: Too many levels of symbolic links

One blog post recommended that I remove the /.rvm/usr/ssl/man with rm -rf and try to run bundle install again to no avail.
Next, I searched online and found an article that recommended specifying the system OpenSSL libraries during the ruby installation to make use of the system openSSL.
I removed ruby-2.3.4 using

rvm remove ruby-2.3.4

I installed ruby-2.3.4 using

rvm install ruby-2.3.4 --with-openssl-dir='/usr/local/opt/openssl'

This looked promising until I started encountering problems with v8 and therubyracer. My gem install for therubyracer would always fail here, v$HOME/.rvm/rubies/ruby-2.3.4/lib/ruby/gems/2.3.4/extensions/universal-darwin-19/2.6.0/therubyracer-0.12.3/mkmf.log, with an openSSL error.
Some more googling led me to the following link with the following code:

brew tap homebrew/versions
brew install v8-315
gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
bundle install


Even after running this code, the bundle install would eventually fail with the inability to load openSSL.
Finally, I stumbled across the idea to install an older version of OpenSSL and to have the rvm install point to this older version of OpenSSL. Believe it or not this actually worked.
I installed the older version of OpenSSL with a tab by rbenv.

brew install rbenv/tap/[email protected]

Then I reinstalled ruby version referencing the old version of openssl. Success.

rvm reinstall 2.3.0 --with-openssl-dir='/usr/local/opt/[email protected]'
Free AWS Services Template

Download list of all AWS Services PDF

Download our free PDF list of all AWS services. In this list, you will get all of the AWS services in a PDF file that contains  descriptions and links on how to get started.

Joel Garcia

Joel Garcia

Joel Garcia has been building AllCode since 2015. He’s an innovative, hands-on executive with a proven record of designing, developing, and operating Software-as-a-Service (SaaS), mobile, and desktop solutions. Joel has expertise in HealthTech, VoIP, and cloud-based solutions. Joel has experience scaling multiple start-ups for successful exits to IMS Health and Golden Gate Capital, as well as working at mature, industry-leading software companies. He’s held executive engineering positions in San Francisco at TidalWave, LittleCast, Self Health Network, LiveVox acquired by Golden Gate Capital, and Med-Vantage acquired by IMS Health.

Related Articles

Top Software as a Service Companies in 2024

Top Software as a Service Companies in 2024

Spending for public cloud usage continues to climb with every year. In 2023, nearly $600 billion was spent world-wide with a third of that being taken up by SaaS. By comparison, Infrastructure as a Service only takes up $150 billion and Platform as a Service makes up $139 billion. On average, companies use roughly 315 individual SaaS applications for their operations and are gradually increasing on a yearly basis. SaaS offers a level of cost efficiency that makes it an appealing option for consuming software.

AWS Graviton and Arm-architecture Processors

AWS Graviton and Arm-architecture Processors

AWS launched its new batch of Arm-based processors in 2018 with AWS Graviton. It is a series of server processors designed for Amazon EC2 virtual machines. The EC2 AI instances support web servers, caching fleets, distributed data centers, and containerized microservices. Arm architecture is gradually being rolled out to handle enterprise-grade utilities at scale. Graviton instances are popular for handling intense workloads in the cloud.

What is Tiered Pricing for Software as a Service?

What is Tiered Pricing for Software as a Service?

Tiered Pricing is a method used by many companies with subscription models. SaaS companies typically offer tiered pricing plans with different services and benefits at each price point with typically increasing benefits the more a customer pays. Striking a balance between what good rates are and the price can be difficult at times.