echo 'export PATH="$(gem env home)/bin":$PATH' >> ~/.zshrc
Install rvm.
command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
curl -L get.rvm.io | bash -s stable
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
Install ruby.
rvm list known
rvm install ruby-3.1.0
rvm use ruby-3.1.0 --install --default --create