Do not use the system Ruby on macOS

David Morales David Morales
/
Broken ruby

The version of Ruby that comes preinstalled on macOS is both outdated and unsupported. This is problematic because many modern gems and frameworks, such as newer versions of Rails, require at least Ruby 3, making the system Ruby unusable. In other words, even if you wanted to rely on the system Ruby, it’s simply not compatible with today’s Ruby ecosystem.

Why you should not use the system Ruby on macOS

The inclusion of Ruby on macOS is primarily for legacy compatibility rather than active development. Apple’s long-term plan may well involve removing it altogether—just as they did with Python.

Another issue with the system Ruby is that it doesn’t support installing gems out of the box. Attempting to use gem install triggers a permissions error because Apple has locked down write access to system directories. Although there are workarounds—such as changing the installation path—these solutions are limited, and given the outdated Ruby version, even a successful gem installation may not ensure that everything works as intended. Bad advice online might encourage using sudo to force installation, but that’s a dangerous practice that can introduce security risks and system instability.

Finally, Apple’s Ruby is configured differently from versions installed by dedicated Ruby version managers or installation tools. This minimal, locked-down configuration means certain gems might fail to install or operate correctly. Modern Ruby installation tools not only provide the latest Ruby versions, but they also ensure the necessary libraries and configurations are present. This makes them a far better long-term choice to ensure stability, security, and compatibility across your Ruby projects.

Can the system Ruby be updated on macOS?

On a Mac, Ruby is built into the operating system and stored in special system folders that Apple manages. Upgrading this system version can cause serious problems, because Apple designed it for internal use and compatibility with older programs. If you try to upgrade it, some apps that rely on that exact Ruby version would stop working as expected.

Instead of upgrading the system Ruby, it’s safer to install a separate, newer version of Ruby just for your own projects. This way, you can enjoy the latest features without damaging your Mac’s stability or functionality. Apple might never update their built-in Ruby to a newer version, so taking control of your own Ruby environment will give you more freedom and keep your system healthy.

Can the system Ruby be removed on macOS?

This built-in Ruby version is often used for legacy software, and uninstalling it could cause the system to act unpredictably. Even if you don’t see immediate issues, future system updates might assume Ruby is still there, potentially causing serious headaches.

If you do accidentally damage or modify this built-in Ruby, you can’t just install it again by itself; you might have to completely reinstall your operating system to fix the issue.

In short, it’s best to leave the system Ruby alone.