ruby-install

Lightweight Ruby installer supporting multiple Ruby implementations

brewmacoslinux
Try with needOr install directly
Source

About

Install Ruby, JRuby, Rubinius, TruffleRuby, or mruby

Commands

ruby-install

Examples

Install the latest stable version of Ruby$ ruby-install ruby
Install a specific Ruby version (e.g., 3.2.0)$ ruby-install ruby 3.2.0
Install JRuby to a custom directory$ ruby-install --install-dir ~/.rubies jruby