Master Ruby on Rails: Build Web Apps in 5 Steps

Master Ruby on Rails: Build Web Apps in 5 Steps

🧰

Instant Toolkit

3 artifacts

📋
Step-by-Step Guide

1

Step 1: Set Up Environment

Prerequisites

  • macOS 10.15+, Ubuntu 22.04+, or Windows with WSL Ubuntu 24.04.

Install on macOS/Linux/Windows (use Mise version manager)

  1. Install dependencies (macOS example):
xcode-select --install  # macOS
brew install openssl@3 libyaml gmp rust  # macOS

Linux: sudo apt install build-essential rustc libssl-dev libyaml-dev zlib1g-dev libgmp-dev git

  1. Install Mise:
curl https://mise.run | sh
echo 'eval "$(~/.local/bin/mise activate)"' >> ~/.zshrc  # or ~/.bashrc
source ~/.zshrc
  1. Install Ruby 3.3+:
mise use -g ruby@3.3.6
  1. Install Rails:
gem install rails
rails --version  # => Rails 8.1+
  1. Create app:
rails new blog
cd blog
bin/rails db:create db:migrate
bin/rails server

Visit http://localhost:3000.

Why this step matters:
  • -Establishes a working environment to experiment immediately
  • -Enables building and running real Rails apps confidently
2-4 hours
Terminal, Mise, VS Code, SQLite
$0
Definition of Done
  • Rails server runs at localhost:3000 showing welcome page
  • Can create new app and run db:migrate
Common Mistakes to Avoid

PATH not updated after installing Mise/Ruby

Source ~/.zshrc or restart terminal; run `mise activate`

Wrong Ruby version (<3.2)

Use `mise use -g ruby@3.3.6` and verify with `ruby --version`

2

Following along, or just reading? 👀

Spin up a personalized “learn Ruby on Rails” plan you can save, check off, and return to anytime — unlimited on the free trial.

Start free trial →
3
4
5