If all you want it to install the latest version of Ruby and don’t require different versions of it installed side by side you can use Homebrew to install it on