Ruby with OpenSSL 1.1

Some Ruby features like scrypt and hkdf require OpenSSL 1.1. Here’s how to make it work on Mac:

Install rbenv and OpenSSL 1.1

brew install rbenv ruby-build openssl@1.1

Install Ruby

RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local/opt/openssl@1.1" \
rbenv install 2.6.3

Open an interactive shell to confirm it worked

rbenv shell 2.6.3
irb

And run

require "openssl"
OpenSSL::OPENSSL_VERSION
OpenSSL::KDF.methods - Object.methods

Published July 11, 2019


You might also enjoy

Learn Data Science

Introducing Archer: Rails Console History for Heroku, Docker, and More

Bulk Upsert in Ruby/Rails


All code examples are public domain.
Use them however you’d like (licensed under CC0).