Ruby

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

Install the Latest Ruby Version

How to install the latest Ruby version. Download Ruby 4.0. Use Homebrew, Mise, or rv to install and manage Ruby versions. Compare other version managers. Links to full instructions and troubleshooting tips.

Ruby is widely known for its use by web developers, but it is just as popular for API backends, background jobs, devops scripting, and automation, where devs value Ruby's expressive, programmer-friendly syntax. After a boom in the 2000s, its popularity has settled in the mid-tier of languages, but it is still a coder favorite for good reason.

This Mac Install Guide website has always been popular for Ruby installation help so in 2026 I updated all the Ruby articles to cover the latest tools and practices, starting with the usual warning Don't Use the macOS System Ruby. Before this, users encountered a bewildering mix of version managers and installation options. Tooling has evolved, and I now can recommend Mise and rv to simplify installation and version management, with Homebrew as an option for more casual use. These tutorials cover every aspect of Ruby installation on Mac, and compare the older version managers that you might have used, showing you the current best approach for setting up and managing Ruby.

Of course, installing Ruby is just one step in setting up your Mac for software development. See the Mac development setup guide for the whole picture.

Before you get started

You'll need a terminal application to install and use Ruby. Apple includes the Mac terminal but really, do yourself a favor and upgrade to 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.

Latest Ruby version

The current version is Ruby 4.0, released December 25, 2025 (Ruby 4.0.2 is the latest release as of March 2026). See The New Ruby 4.0 to learn what's changed since Ruby 3.4, with links to latest patches.

A new version of Ruby is released every year at Christmas. You should start any new project with the latest Ruby version, but many large Ruby projects use older, legacy versions of Ruby and you'll need a version manager to switch easily among projects. Many Ruby developers are using older, inefficient or outdated version managers so you can read here what is currently recommended to manage Ruby 4.0.

Update Ruby to the latest version

If you've already installed an earlier version of Ruby:

The guide gives you instructions for updates with all popular installation methods.

But if you've never installed Ruby, see the steps below.

How to install Ruby

Jump directly to practical instructions with these links to the installation guides.

First steps to install Ruby

First, check the macOS version. If you're running an older version, update macOS to the latest macOS version. Take the time to make sure your operating system is up to date and you've Set Up a Mac Like a Pro.

Before you install Ruby, you'll need to Install Xcode Command Line Tools but if you Install Homebrew, the macOS software package manager, you can Install Xcode Command Line Tools with Homebrew.

Ruby 4.0 installation options

It's best to install Ruby with a version manager. See the article Compare Ruby Version Managers. Here are my recommendations:

If you don't need Ruby for multiple projects (only for casual use like school or running scripts), you can install Ruby directly with Homebrew:

After Ruby installation

Before you start work on a project, learn about Ruby gems (software libraries) and Bundler, the project dependency manager. You'll find essential troubleshooting help here:

You might need to troubleshoot or uninstall Ruby:

If you're not sure which installation approach is best for you, I explain it here.

Homebrew or a Ruby version manager?

Before you install Ruby, decide if you should simply install Ruby with Homebrew or if you need a language version manager.

Most developers install Homebrew on a Mac for all the useful utilities needed for development. It also installs programming basics such as Xcode Command Line Tools. And, if you decide you need a language version manager such as Mise or rv, you'll likely install the version manager using Homebrew. However, Homebrew is not a good choice for installing Ruby if you need to switch among Ruby versions.

Homebrew (for casual users)

Homebrew is a software package manager that adds languages and command-line tools to the Mac. It can install one (and only one!) version of Ruby (usually the latest version).

Install Ruby with Homebrew if you're building only one project with Ruby (for example, if you are a student learning Ruby). You can easily remove Ruby after installing with Homebrew and re-install a newer version when you need it. Don't install Ruby with Homebrew if you need to switch among Ruby versions (use Mise or rv instead).

Mise (for multiple languages)

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 Ruby on Rails developers who need both Ruby and Node for JavaScript, Mise is the best choice. See Install Mise on Mac and Install Ruby with Mise.

rv (for Ruby only)

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 like the popular uv for Python.

Legacy version managers

If you're already using version managers asdf, chruby, rbenv, or rvm, your setup still works fine. For new installations, we recommend Mise (multiple languages) or rv (Ruby only). See Choose a Ruby Version Manager for a detailed comparison. For existing asdf users, Mise is a faster, compatible successor that uses the same plugin ecosystem. If you considered Frum, it is no longer maintained (the last update was in 2021); we recommend rv as a replacement.

Docker

Use Docker (or Nix) if you're on a team with a complex project environment (for example, Ruby, Node, Redis, and PostgreSQL all in one project). Docker is ideal for creating a reproducible virtual server. You can develop locally within a container but it will run slower, require more memory, and adds configuration complexity compared to a simple version manager. To keep things simple, don't use Docker for local development unless your application is disturbingly complex.

Lastly, don't use the system Ruby

MacOS comes with a system Ruby pre-installed. It is an old version of Ruby and not the newest version. If you use the system Ruby you'll need root access (sudo) to install gems (introducing a security risk). And you'll end up with a cluster of (sometimes incompatible) gems that can't be easily removed to restore your system to a clean state. See Why You Shouldn't Use macOS System Ruby.

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.