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 · Tweet


You might also enjoy

Why and How to Keep Your Decryption Keys Off Web Servers

Installing Presto for Mac

Hardening Devise


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