Fix 'Rails is not currently installed on this system' on macOS

By

How to fix the Rails is not currently installed on this system error on macOS: skip the system Ruby, install Ruby with Mise or rbenv, then gem install rails.

~~~

The fix for the Rails is not currently installed on this system error on macOS is to stop using the system Ruby, install a Ruby version manager, install a current Ruby, then install Rails with gem install rails.

That’s the short version. Here’s the full story.

I tried to install Rails but I kept getting that error every time I typed rails. macOS ships with its own Ruby, but it’s there for the operating system, not for you. It’s old, and installing gems into it is a fight against permissions you don’t want to have. The rails message you see comes from a macOS stub, not from a real Rails install.

The clean way out is a separate Ruby, managed by a version manager, living in your home folder. No sudo, no touching system files. Never run sudo gem install.

As of September 2026, Rails 8.1 is the current release. It needs Ruby 3.2 or newer. The current Ruby is 4.0, and Ruby 3.4 is still maintained. The official Rails install guide uses Mise and installs the latest Ruby 3, so the steps below do the same. rbenv is also common. RVM still works, but it’s the legacy option now.

Install Mise with Homebrew:

brew install mise

Activate it in your shell. On Zsh:

echo 'eval "$(mise activate zsh)"' >> ~/.zshrc
source ~/.zshrc

On Fish:

echo 'mise activate fish | source' >> ~/.config/fish/config.fish

Then open a new terminal window.

On Apple Silicon, Mise downloads a precompiled Ruby. On an Intel Mac it compiles Ruby from source, so install the build dependencies the Rails guide lists first:

brew install openssl@3 libyaml gmp rust

Install Ruby 3.4 and set it as the default:

mise use --global [email protected]

Confirm you are not on system Ruby:

which ruby
ruby -v

which ruby should point under your Mise installs (or shims), not /usr/bin/ruby.

Then install Rails:

gem install rails
rails -v

You should see Rails 8.1 or newer. To create a new project:

rails new blog

Alternative: rbenv

rbenv always compiles Ruby from source, so install the build dependencies its docs list first:

xcode-select --install
brew install openssl@3 readline libyaml gmp autoconf rust

Then install rbenv with Homebrew, and let it add itself to your shell config:

brew install rbenv
rbenv init

Open a new terminal window, then install Ruby. rbenv install 3.4 picks the latest 3.4.x release:

rbenv install 3.4
rbenv versions

rbenv global wants the exact version it installed, so copy the number rbenv versions prints (3.4.10 in September 2026):

rbenv global 3.4.10
gem install rails

Same rule: which ruby must not be /usr/bin/ruby.

Legacy alternative: RVM

If you already use RVM, or a guide points you there, this still works. Prefer Mise or rbenv for new machines.

First, install gpg2, which rvm uses to verify its installer:

brew install gpg2

Then import the keys the rvm installer is signed with:

gpg --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

Then run the installer:

curl -sSL https://get.rvm.io | bash -s stable --rails

This installs rvm itself, plus a stable Ruby, plus Rails. Everything lands under ~/.rvm. No sudo.

Load it in the current shell:

source ~/.rvm/scripts/rvm

New terminal windows load rvm via your shell profile. Confirm with which ruby. It should print a path under ~/.rvm, not /usr/bin/ruby.

Fish shell with RVM

On Fish:

curl -L --create-dirs -o ~/.config/fish/functions/rvm.fish https://raw.github.com/lunks/fish-nuggets/master/functions/rvm.fish
echo "rvm default" >> ~/.config/fish/config.fish

Restart the terminal, then try rails again.

Tagged: Mac · All topics

Want me to talk about your product? You can sponsor this site.

~~~

Related posts about mac: