Understanding Rails · Season 2: Getting started
Installing Ruby and Rails
Episode 10 · overview · about 2 minutes · Rails 8.1 · by Tommy A. Caruso
How was this episode?
The series' author reads every note, and no one else sees it. When something is wrong or unclear, it gets fixed and the episode re-cut. How this series stays right.
Not endorsed yet. Are you a Rails developer? What's an endorsement?
Endorse this version To endorse: create an account, confirm your email, then link GitHub.
What changed
- Version 3, November 20, 2026: Added the mise line for Linux and WSL, which use bash, not zsh.
- Version 2, November 20, 2026: Added the build tools Ruby needs first, and the line that turns mise on in your shell.
A Ruby version manager, gem install rails, and what rails new asks and makes.
Free to watch. If it helped, support the series.
Transcript
0:00 Installing Ruby and Rails
Episode ten. Installing Ruby and Rails. By the end, you'll have a new Rails app running on your own computer.
0:11 A version manager
First, Ruby. Don't use the Ruby your system came with. Install a version manager, so each project can pick its own Ruby. We'll use mise.
0:21 Installing mise
First, the build tools Ruby needs. The Rails install guide lists them for a Mac, for Linux, and for Windows. Then one line installs mise, and one more turns it on in your shell. On Windows, install WSL first, and do everything inside it.
0:38 Installing Ruby
Then tell mise which Ruby you want: mise use, dash dash global, ruby at four. A few minutes later, ruby dash v answers.
0:48 Installing Rails
Ruby comes with gem, its package installer. Gem install rails fetches Rails and everything it needs.
0:56 rails new
Now make an app. Rails new switchback writes a whole project: its folders, a database, a test suite, and a deploy config.
1:05 Starting the server
Step into it and start the server: cd switchback, then bin slash rails server.
1:12 The welcome page
Open localhost, port three thousand, in your browser, and Rails greets you. That page means everything works.
1:20 What you didn't install
No Node, no Redis, and no separate database to install. Next, a tour of everything rails new just wrote.
Check your understanding
-
Your computer already came with Ruby. Why install a version manager like mise anyway?
- Rails will not run on any Ruby that came with the system
- The system Ruby is often old, can't be upgraded, and every project would have to share it
- mise makes Ruby run faster
- gem install only works with mise
Show answer
The system Ruby is often old, can't be upgraded, and every project would have to share it. The system Ruby is often outdated and hard to upgrade. A version manager lets each app use its own Ruby. Source: Install Ruby on Rails (Rails Guides 8.1).
-
You work on Windows. Where should you install Ruby and run your Rails commands?
- In PowerShell, with a Windows Ruby installer
- In the Windows Command Prompt
- Inside WSL, the Linux system that runs inside Windows
Show answer
Inside WSL, the Linux system that runs inside Windows. The guide says WSL gives the best experience on Windows. It runs Ubuntu, close to the servers you will deploy to. Source: Install Ruby on Windows, Install Ruby on Rails (Rails Guides 8.1).
-
What does gem install rails do?
- Downloads Rails and the gems it needs, and makes the rails command available
- Creates a new Rails app in the current folder
- Starts a Rails server
- Adds Rails to your app's Gemfile
Show answer
Downloads Rails and the gems it needs, and makes the rails command available. gem is Ruby's package installer. It fetches Rails and its dependencies from RubyGems.org. rails new is what makes an app. Source: Installing Rails, Install Ruby on Rails (Rails Guides 8.1).
-
You ran cd switchback, then bin/rails server. Which address shows your app in the browser?
- http://localhost:80
- http://localhost:8080
- http://localhost:3000
- http://switchback.test
Show answer
http://localhost:3000. bin/rails server starts Puma, which listens on port 3000 by default. Source: Starting a Rails Application Server, The Rails Command Line (Rails Guides 8.1).
Sources
Every example in this episode was run on Rails 8.1.4.1 and Ruby 4.0.2.
- Install Ruby on Rails (Rails Guides 8.1)
- Install Ruby on Windows, Install Ruby on Rails (Rails Guides 8.1)
- Installing Rails, Install Ruby on Rails (Rails Guides 8.1)
- Creating Your First Rails App, Getting Started with Rails (Rails Guides 8.1)
- Starting a Rails Application Server, The Rails Command Line (Rails Guides 8.1)