
What it’s about
Ruby on Rails Tutorial teaches web development by building one project from scratch. Michael Hartl walks through a Twitter-style sample app, covering installation, the command line, models, user login, testing with Git and deployment, with practice exercises after every chapter.
Read it if
You learn best by typing along with a real project, and you want to leave with a deployed application and tests.
Skip it if
You already build Rails apps, or need the newest framework features, since the lessons track a specific edition and move at beginner pace.
Key ideas
- Hartl teaches Rails by constructing a single application from nothing, so each concept appears when it is needed and not in isolation.
- Tests are written alongside the code, which trains new developers to treat automated checking as part of the work from day one.
- The book assumes readers will get stuck, so it explains tools such as Git, the console and deployment along with the framework itself.
Our take
Michael Hartl has a PhD in physics from Caltech, which is probably not the background you would expect from someone who wrote the most popular Ruby on Rails tutorial in the world. But the physics training shows. Hartl teaches with the precision of someone who believes every concept should be built from first principles, with each step clearly explained and each assumption made explicit.
The tutorial walks the reader through building a Twitter-like application called the Sample App. It starts with zero: installing Ruby, setting up a development environment, learning the command line. By the end, the reader has a functioning application with user authentication, database models, automated testing, and deployment to a production server. Every line of code is explained. Every design decision is justified.
The approach is learning by building. Hartl does not spend chapters explaining theory and then ask you to apply it. He introduces concepts as they become necessary to build the next feature. You learn about database migrations because the app needs a database. You learn about automated testing because the app needs tests. You learn about sessions and cookies because the app needs user login. The learning always has immediate context.
The tutorial has gone through multiple editions, updated for each major Rails release. The physical book is published by Pearson, but the full text is available for free online at railstutorial.org, which has made it one of the most accessible programming tutorials on the internet. Hartl also offers paid video versions and a subscription service for additional content.
Rails has declined somewhat in popularity since the tutorial first appeared, as JavaScript frameworks like React and Next.js have taken over parts of the web development market. But the tutorial remains valuable for several reasons. The fundamentals it teaches, how the web works, how to structure an application, how to write tests, how to deploy code, apply regardless of the framework. And Rails itself, while less fashionable than it was in 2010, still powers Shopify, GitHub, Basecamp, and other major applications.
Hartl writes clearly, patiently, and with the assumption that the reader is intelligent but has no prior programming experience. The tutorial is long, several hundred pages in the book version, but it never wastes the reader’s time. If you want to learn web development and prefer to learn by building a real application rather than reading about abstract concepts, this is where a lot of successful developers started.
Appears in
One good book a week
The most-recommended new pick, who recommended it and why. Every Friday.
