Mobile Fastlane

Install Ruby (macOS)

Last updated 2026-10-07

Install Ruby on macOS with a version manager. macOS ships a system Ruby, but it is outdated and owned by the OS. Installing gems into it needs sudo and can break system tools, as noted in the fastlane iOS setup guide.

  1. 1

    Install Homebrew (if needed)

    Homebrewlatest

    The macOS package manager used by the other macOS install commands.

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    Verify: brew --version

    Follow brew.sh, then confirm with brew --version.

  2. 2

    Install rbenv and Ruby 3.4.1

    my-app — zsh
    ~/my-app $ brew install rbenv ruby-build
    ~/my-app $ rbenv init
    # Follow the printed instruction (adds rbenv to ~/.zshrc), then open a new terminal
    ~/my-app $ rbenv install 3.4.1
    ==> Installed ruby-3.4.1 to /Users/you/.rbenv/versions/3.4.1
    ~/my-app $ rbenv local 3.4.1
    # writes .ruby-version in the project root
  3. 3

    Install Bundler

    my-app — zsh
    ~/my-app $ gem install bundler
    Successfully installed bundler-2.6.2
  4. 4

    Verify

    my-app — zsh
    ~/my-app $ which ruby
    /Users/you/.rbenv/shims/ruby
    ~/my-app $ ruby --version
    ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [arm64-darwin24]
    ~/my-app $ bundle --version
    Bundler version 2.6.2
    which ruby must point to ~/.rbenv/shims, not /usr/bin/ruby.
Caution: don't use the macOS system Ruby (/usr/bin/ruby) and never run sudo gem install.

Next steps

Official documentation

Was this helpful?