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

And run

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

Published July 11, 2019

You might also enjoy

Installing Presto for Mac


Google OAuth with Devise

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