Ruby

There is no AI here. All content is human-authored and tested for accuracy.

Update Ruby

Update Ruby on Mac. Install Ruby 4.0, the current Ruby version. How to update the Ruby version on macOS. How to download and upgrade Ruby with rbenv, rvm, or newer version managers.

Ruby 4.0 was released December 25, 2025. It is the first major version bump since Ruby 3.0 in 2020. See What's New in Ruby 4.0 for full details.

You should try to keep up with the Ruby new releases to minimize technical debt. Upgrading to Ruby 4.0 is easy for most projects. The language API is consistent with previous releases and the optional new features improve developer tooling and performance.

How you'll update Ruby depends on how it was first installed. For years, Ruby has had a mix of version managers, including asdf, chruby, rbenv, or rvm, some more popular than others. Ruby tooling has evolved significantly in the last year, and now I recommend Mise or rv for Ruby installation and version management. See Choose a Ruby Version Manager for Mac.

An update to Ruby is just one step in setting up your Mac for software development. See a complete Mac setup roadmap for the whole picture.

Before you get started

You'll need a terminal application to update and use Ruby. Apple includes the Mac terminal but I prefer Warp Terminal. Warp is an easy-to-use terminal application, with AI assistance to help you learn and remember terminal commands. Download Warp Terminal now; it's FREE and worth a try.

First steps to update Ruby on Mac

Do you want to check the macOS version? Take the time to make sure your operating system is up to date and update macOS to the latest macOS version. Then Set Up a Mac Like a Pro with all the best settings and preferences.

If you've already installed Ruby, you've installed Xcode Command Line Tools and probably Homebrew, the macOS software package manager. You might want to do some Housekeeping for Homebrew.

Consider whether you want to switch to a newer version manager before you start updating Ruby with your current version manager or Homebrew.

Time to switch version managers?

Most developers use a language version manager to switch among multiple versions of Ruby. It is a must if you have projects that use different versions of Ruby. If you're upgrading Ruby, you might want to change version managers at this time. See Choose a Ruby Version Manager for Mac.

Mise is a modern, fast version manager (written in Rust) for multiple languages including Ruby, Node, Python, and Java. If you develop with more than one language, especially if you are a Ruby on Rails developer who needs both Ruby and Node for JavaScript, Mise is the best choice. See Install Mise on Mac and Install Ruby with Mise.

Alternatively, the tool rv is a fast, all-in-one utility (also written in Rust) that installs precompiled Ruby in seconds, manages versions, and isolates gems per project, replacing older combinations of installers and version switchers with a single binary. If you only work with Ruby, rv is the simplest and fastest option. See Install rv on Mac. It is similar to the popular uv for Python.

If you're already using asdf, chruby, rbenv, or rvm, your setup still works fine. For new installations, I recommend Mise (for managing multiple languages) or rv (for managing Ruby only).

How was Ruby installed?

First you have to know which version manager you've used to install Ruby. Then I'll show you the correct update command.

Any version manager needs a PATH or activation setting in a shell configuration file. It is the first place to see what version manager you've used to install Ruby. You can also use ruby -v and which ruby to see what Ruby is currently active; see Check Ruby Version on Mac for details.

Open a terminal application and check:

$ grep -E 'brew|mise|rv|chruby|asdf|rbenv|rvm|frum' ~/.zshrc ~/.zprofile ~/.bashrc ~/.bash_profile ~/.profile 2>/dev/null

That's a first step. Some lines might be commented out from experiments or old configurations. The next step is to try the command which -a ruby to show any version of Ruby that is recognized by the command shell.

Here is a list of commands to try, possible results, and the recommended upgrade command for each Ruby instance.

The system Ruby

Check if only the system Ruby is recognized:

$ which -a ruby
/usr/bin/ruby

If you see /usr/bin/ruby, it is the system Ruby which comes pre-installed on macOS to support scripting. See the article Why You Shouldn't Use macOS System Ruby for an explanation (the system Ruby is there for macOS, not you). Don't try to remove the system Ruby. Leave it in place and use Homebrew or a version manager to install a newer Ruby version.

Homebrew

Homebrew is a package manager, not a version manager. It only installs one version of Ruby. You cannot switch among Ruby versions with Homebrew. That's a drawback if you can't upgrade all your projects to the same version of Ruby. Install a version manager if you need to switch among Ruby versions.

Check if Ruby was installed with Homebrew:

$ which -a ruby
/opt/homebrew/opt/ruby/bin/ruby

or

$ which -a ruby
/usr/local/bin/ruby

If Ruby was installed by Homebrew, you'll see /opt/homebrew/opt/ruby/bin/ruby (on Apple Silicon) or /usr/local/bin/ruby (on older Intel Macs).

Check if Homebrew shows that Ruby was installed:

$ brew list ruby

To update Ruby with Homebrew:

$ brew upgrade ruby

See Install Ruby with Homebrew for details.

If you want to switch to using a version manager, you can Uninstall Ruby with brew uninstall ruby and install Ruby with Mise or install Ruby with rv.

Mise

Check if Ruby was installed with Mise:

$ which -a ruby
~/.local/share/mise/installs/ruby/...

If Ruby was installed with Mise, you will see a path containing mise/installs/ruby.

Check if Mise shows that Ruby was installed:

$ mise list ruby
Tool  Version  Source  Requested 
ruby  4.0.2 

To update Ruby to the latest version with Mise, for just the project in the current directory:

mise upgrade ruby --bump

This upgrades Ruby to the latest version and bumps the version in the project .mise.toml configuration file.

If you want to update a Ruby version that is installed globally as a default for all projects:

$ mise install ruby@latest
$ mise use --global ruby@latest

See Install Ruby with Mise for details.

See Uninstall Ruby on Mac if you want to remove earlier versions.

rv

Check if Ruby was installed with rv:

$ which -a ruby
~/.local/share/rv/rubies/...

If Ruby was installed with rv, you will see a path containing .rv/rubies.

Check if rv shows that Ruby was installed:

$ rv ruby list

To update Ruby to the latest version with rv:

$ rv ruby install latest

See Install Ruby with rv for details.

See Uninstall Ruby on Mac if you want to remove earlier versions.

asdf

Check if Ruby was installed with asdf:

$ which -a ruby
~/.asdf/shims/ruby

If Ruby was installed with asdf, you will see the ~/.asdf/shims/ruby directory.

Ruby versions are installed by default in ~/.asdf/installs/ruby.

I now recommend Mise as a faster alternative to asdf. See Install Ruby with Mise. The asdf instructions below remain valid for existing asdf users.

To update Ruby to the latest version with asdf:

$ asdf install ruby latest

See Install Ruby with Asdf for details.

See Uninstall Ruby on Mac if you want to remove earlier versions.

chruby

Check if Ruby was installed with chruby:

$ which -a ruby
~/rubies/

If Ruby was installed with chruby (with the ruby-install utility), it will be in ~/rubies/ by default.

Check if chruby shows that Ruby was installed:

$ chruby
   ruby-1.9.3-p392

To update Ruby to the latest version with chruby:

$ ruby-install --latest ruby

See Install Ruby with chruby for details.

See Uninstall Ruby on Mac if you want to remove earlier versions.

rbenv

Check if Ruby was installed with rbenv:

$ which -a ruby
~/.rbenv/versions/

If Ruby was installed with rbenv (with the ruby-build utility), it will be in ~/.rbenv/versions/ by default.

To update Ruby to the latest version with rbenv, use the ruby-build utility:

$ ruby-build 4.0.2

See Uninstall Ruby on Mac if you want to remove earlier versions.

RVM

Check if Ruby was installed with RVM:

$ which -a ruby
~/.rvm/rubies/

If Ruby was installed with rvm, it will be in ~/.rvm/rubies/ by default.

To update Ruby to the latest version with RVM and set it as a default:

$ rvm install 4.0.2
$ rvm use 4.0.2
$ ruby --version

See Uninstall Ruby on Mac if you want to remove earlier versions.

If you need to change the Ruby version for a specific project, see Change the Ruby Version in a Project.

frum

Check if Ruby was installed with frum:

$ which -a ruby
/var/folders/...

If Ruby was installed with frum, it will be in /var/folders/... by default.

Frum is no longer maintained (last update: 2021). I recommend rv as a modern, actively maintained replacement.

See Uninstall Ruby on Mac if you want to remove earlier versions.

Continue setting up your Mac

Don't miss the full visual roadmap and checklist that shows how to set up a Mac for software development, with all the essential tools and settings you might not yet know about.