rvm is a version manager for Ruby.
Run the following command to install rvm on macOS:
\curl -sSL https://get.rvm.io | bash -s -- --version latestRestart your shell. Confirm rvm is working:
rvm -vTo list installable Ruby versions:
rvm list knownInstall a specific version of Ruby:
rvm install 3.0.4Use a specific version of Ruby:
rvm use 3.0.4Uninstall a specific version of Ruby:
rvm uninstall 3.0.4If you have problems installing a Ruby version due to missing OpenSSL packages, run the following to resolve to OpenSSL in /usr/local/opt:
rvm install 3.2.0 --with-openssl --with-openssl-lib=/usr/local/opt/openssl@1.1/lib --with-openssl-include=/usr/local/opt/openssl@1.1/includeYou can uninstall rvm with the following command:
rvm implode