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