Should i use rvm pkg install openssl

I’ve been trying to use this instead of a system openssl by first removing installed rubies and then installing the rvm openssl package and then installed rubies after but when I run bundle, bundler complains that I need to recompile ruby with openssl support This is the command I used to install ruby: rvm install 3.1.2 --with-openssl-dir=$HOME/.rvm/src/openssl-1.0.1i/apps/openssl

1.0.1i is an old version of SSL. It’s best to use the latest version for security. If you link to the one provided by RVM, you’re stuck with that version. However, if you link to the one installed by Homebrew, whenever it gets updated by Homebrew, your Ruby version will be using the latest version.

For Ruby 3.1.2, I recommend using the latest version of either OpenSSL 1.1 or 3 as provided by Homebrew. You can install them like this, assuming you’re on a Mac:

brew install openssl@1.1 openssl@3

You can then link to them like this:

--with-openssl-dir="$(brew --prefix openssl@3)"