Preface
Rails is built on Ruby — and this book doesn’t teach you
Ruby. It teaches you Ruby on Rails 8.1, the framework.
If Ruby is still new to you, start with the
Ruby
Introduction first — a ten-chapter primer written as the
prerequisite for this book — and come back when classes,
blocks and def feel normal.
No prior Rails experience required. Every example runs on Ruby 4.0 and Rails 8.1; screenshots come from fresh Rails 8 scaffolds.
Rails isn’t small, and it isn’t easy. No sugar-coating there. But it’s one of the most productive web frameworks in serious production — once the conventions and machinery click, you’ll ship at a pace that’s hard to match anywhere else. Worth every hour you put in.
The book doubles as the material I use in my Rails workshops — written in a step-by-step shape so you can work through it on your own. Short examples, one concept at a time, skip-friendly. Rather than growing one big application across chapters, I favour smaller stand-alone code so you can skip pages or whole chapters without losing context. Expect to spin up a new Rails application more often than you might think. Word of warning: I won’t sprinkle CSS beauty anywhere. ;-)
Most readers will write Rails code alongside an AI coding
agent, and this book assumes you are one of them.
Everything still works if you type every character yourself.
Throughout the book you’ll find boxes labelled Agentic
Coding Tip flagging the places where an agent reliably
takes a wrong turn, together with the concrete CLAUDE.md
rule or prompt that keeps it honest. Treat those as
landmines specific to each topic, not as general AI advice.
A dedicated Agentic Coding
chapter covers the workflow itself: how to shape your
CLAUDE.md, when to reach for subagents, how to use skills.
Shameless plug: if you’d rather have the training itself — personalized, on-site or remote — drop me an email at sw@wintermeyer-consulting.de.
Curious what the Elixir-based Phoenix Framework looks like? I’ve got you covered at Phoenix.
The sidebar lets you jump to any chapter at any time — nothing is locked. That said, the book is written to be read front to back: examples build on earlier ones, and the fastest path from zero to a working Rails app is still "start at the top and keep going".
Don’t be a stranger
A book like this gets better every time a reader sends me a note.
-
Did a chapter click, or did it leave you more confused than before? Either answer is useful.
-
Found a typo, a broken example, code that no longer works on the current Rails or Ruby version, a link that 404s?
-
Missing a topic you expected? Or curious about something this book doesn’t cover?
Write me at sw@wintermeyer-consulting.de. Feedback, bug reports, kind words, angry words — all welcome.
If you’d rather go through GitHub, the source lives at wintermeyer/rails-book. Issues, feature requests, pull requests — every one of them is appreciated.
— Stefan