Setup Guide

Install Ruby on Rails
on macOS & Windows.

The fastest working setup for Rails 8 — copy-paste commands, curated install videos, and pointers to the official guides. Beginner-friendly, no hand-waving.

macOS

Install Ruby & Rails on macOS

Homebrew installs the C toolchain, rbenv manages Ruby versions, and gem install rails finishes the job. Works on Apple Silicon and Intel Macs.

  1. 1. Install Homebrew.
  2. 2. Install rbenv + ruby-build.
  3. 3. rbenv install the latest Ruby 3.x.
  4. 4. gem install rails.
  5. 5. rails new blog and start the server.
# 1. Install Homebrew (skip if you already have it)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# 2. Install rbenv + ruby-build
brew install rbenv ruby-build
echo 'eval "$(rbenv init - zsh)"' >> ~/.zshrc
exec zsh

# 3. Install and activate the latest Ruby
rbenv install 3.3.5
rbenv global 3.3.5
ruby -v   # => ruby 3.3.5

# 4. Install Rails
gem install rails
rails --version   # => Rails 8.x

# 5. Create your first app
rails new blog
cd blog
bin/rails server
# → open http://localhost:3000
Windows

Install Ruby & Rails on Windows

Two supported paths: RubyInstaller for the quickest start, and WSL2 + Ubuntu for the smoothest long-term Rails experience.

  1. A1. Download Ruby+Devkit from rubyinstaller.org.
  2. A2. Accept the MSYS2 setup at the end of the installer.
  3. A3. gem install rails.
  4. B. Or run wsl --install -d Ubuntu and follow the macOS steps inside Ubuntu.
# Option A — Native (fastest for learners)
# 1. Download Ruby+Devkit from https://rubyinstaller.org
#    Pick the latest "WITH DEVKIT" installer (x64).
# 2. Run the installer. At the final step accept the MSYS2 setup
#    and press ENTER to install the default components (1, 3).
# 3. Open a NEW "Start Command Prompt with Ruby" and run:
ruby -v
gem install rails
rails --version
rails new blog
cd blog
bin\rails server

# Option B — WSL2 + Ubuntu (recommended for real projects)
wsl --install -d Ubuntu
# Then reboot, open Ubuntu, and follow the macOS steps above.
Curated

Best install videos & docs

The install guides Rails developers actually recommend — hand-picked, kept up to date by their authors.

Troubleshooting

Common install errors

The four errors that trip up nearly every first-time Rails installer, and how to fix them without reinstalling everything.

"command not found: rails" after gem install
Open a new terminal (so the PATH/shim reloads). On macOS, confirm rbenv is initialised in ~/.zshrc.
"Could not find gem 'sqlite3'" when running rails new
On macOS: `brew install sqlite3`. On Windows native: the RubyInstaller DevKit ships everything; make sure you accepted MSYS2 at the end.
Node / Yarn errors on rails new
Rails 7+ defaults to importmap, no Node needed. If you picked --javascript=esbuild or --css=tailwind, install Node LTS and Yarn first.
Rails runs but pages 500 on first request
Run `bin/rails db:prepare` — the sample app expects the database to exist and be migrated.