Development environment: macOS
This course sets up a macOS development environment for Ruby on Rails, one tool at a time. It explains what a development environment contains and why the Unix base of macOS matters. You install Homebrew, learn how Zsh and the PATH variable find commands, and install Ruby through rbenv instead of using system Ruby. You run PostgreSQL as a background service and configure VS Code with Ruby LSP. The last lesson creates a Rails app with rails new, sets up its databases and starts it with bin/dev.
What you'll learn
- ✓Installing and using Homebrew formulae, casks and services
- ✓How Zsh, PATH and ~/.zshrc control which commands run
- ✓Managing Ruby versions with rbenv, shims and .ruby-version
- ✓Running PostgreSQL with brew services and inspecting it with psql
- ✓Configuring VS Code with Ruby LSP, settings and shortcuts for Rails
- ✓Creating a Rails app and starting it with bin/setup and bin/dev
What is a development environment?
You just got hired as a chef at a new restaurant. Day one, you walk in and the kitchen is completely empty: no stove, no knives, no fridge, no ingredients. You cannot cook a single dish until that kitchen is set up.
Read the full lesson free →Curriculum
7 lessonsWhat is a development environment?
Describes the tools in a Rails development environment and why macOS, built on Unix, suits Rails work.
Homebrew: your package manager
Installs Homebrew and explains formulae, casks, bottles, the Cellar, symlinks and managing background services.
Terminal & shell basics on macOS
Separates the terminal from the Zsh shell and covers PATH order, ~/.zshrc, aliases and useful shortcuts.
Installing Ruby with a version manager
Installs Ruby with rbenv and ruby-build and shows how shims and .ruby-version select the active version.
PostgreSQL on macOS
Installs PostgreSQL 18, runs it through launchd, uses psql and connects Rails through config/database.yml.
VS code for Rails development
Sets up VS Code with the code command, Ruby LSP and other extensions, Rails settings and keyboard shortcuts.
Putting it all together: your first Rails setup
Installs Rails, generates a PostgreSQL app, creates its databases and runs it with bin/dev and Foreman.