There is a problem if I use a version of ruby with a newer version of openssl than what is on the server. Here’s the command to find out what version of openssl that ruby is using.

ruby -e 'require "openssl"; p OpenSSL::OPENSSL_VERSION'

I’ve compiled ruby 3.1.0 twice on my laptop. Once with the newer openssl and once using the old one.

Here’s the command I used for the older version.

    $ ./configure --prefix=/Users/maryh/Software/rubies/3.1.0-openssl11 --with-openssl-dir=/opt/local/libexec/openssl11

And here’s what the ruby version shows.

  yo:~ $ ruby -e 'require "openssl"; p OpenSSL::OPENSSL_VERSION'
"OpenSSL 1.1.1l  24 Aug 2021"
yo:~ $ ruby -v
ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x86_64-darwin21]

Here’s the command I used for the newer version.

  $ ./configure --prefix=/Users/maryh/Software/rubies/3.1.0

And here’s the output from that version.

  yo:~ $ ~/Software/rubies/3.1.0/bin/ruby -e 'require "openssl"; p OpenSSL::OPENSSL_VERSION'
"OpenSSL 3.0.1 14 Dec 2021"
yo:~ $ ~/Software/rubies/3.1.0/bin/ruby -v
ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x86_64-darwin21]