Install Ruby Using Ruby Version Manager (RVM)
Installation
Install GPG Keys:
gpg2 --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB Install RVM:
curl -sSL https://get.rvm.io | bash -s stable Use the following to your shell config so RVM is usable:
echo '[ -f "$HOME/.rvm/scripts" ] && . "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc List all available versions:
rvm list known Install a specified version:
rvm install ruby 3.3.0 List installed versions:
rvm list Set the default Ruby:
rvm --default use ruby-3.3.0 Revert to using the system default:
rvm use system or:
rvm reset Troubleshooting
Error running __rvm_make
Try to update your rvm with head and try again, hopefully it should fix this:
rvm get head Cannot load such file – openssl
rvm pkg install openssl Reinstall your version with the new openssls:
rvm reinstall ruby-3.3.0 --with-openssl-dir="$rvm_path/usr" or reinstall all versions:
rvm reinstall all --force This post is licensed under CC BY 4.0 by the author.
