What Does a Rails Expert Know About Debugging that You Don't?


You've Been Searching the API Docs Online for Hours. That Exception Still Makes No Sense. An Expert Would Know What To Do, But You're Still Sitting There...

I Want to Be a Rails Expert

How Would a Real Expert Learn Rails?

‘The magic thing about Rails is when I looked at it the first time, I knew how it worked because I already knew Ruby really well.

I saw all the metaprogramming tricks; they were almost transparent, looking at it. But I didn't know you could put it together that way and create something so expressive and succinct.’

— Chad Fowler, episode 1 of The Ruby Hangout (0:41:48)

An expert doesn't cut corners. They learn the fundamentals. They learn deeply.

What's Between You and Being an Expert Senior Engineer?

A lot of what separates 'just a developer' from 'senior developer' is independence — the ability to dive deeply into a technical problem and, with exploration, get to the right answer.

A lot of technical problems in the Ruby and Rails world require going into, or through, framework code. Whether that framework is Ruby on Rails, Hanami, Sinatra or something else, it's important to be able to understand how frameworks and applications operate.

Nothing teaches you about frameworks like writing a framework. It's not any more magic than any other coding. It's experience and work. Specifically, it's experience and work in writing and debugging a framework.

Unfortunately, that experience can be difficult to get at work unless you've done it before. It's another "you can't do the work until you have the experience" catch-22's that you've seen before.

Here's one way to break that deadlock: don't wait for work to tell you to build a framework. Just go build one. Rebuilding Rails can help.

Build Your Framework

With Rebuilding Rails you'll build a complete Ruby MVC framework from an empty directory. Your framework will be structured like Rails, using the same architecture and the same metaprogramming tricks. You'll learn the magic behind Rails. You'll finish each system and solidify your knowledge with structured exercises. And you'll get the gut-level understanding that only a framework builder has.

To be an expert, learn the fundamentals. Then you can pick up not just Rails, but any framework you want. Rebuilding Rails will show you the tricks and where to start reading the source code.

When you've built these systems, you get a sort of X-ray vision into the framework. You've had that before with code that you built for yourself. Wouldn't you like the same thing for Rails, Sinatra or your framework of choice?

Future-Proof Mastery

At some point you understand basic coding, and it's time to take on more responsibility. At some point, you need to be ready to take responsibility for larger, uglier bugs and features. And so at some point, you need to master dealing with framework code.

To master Rails, but also Rack and other Ruby frameworks, you need to work with the underlying concepts. That means knowing how an MVC framework is structured. It also means metaprogramming. And you should know a few different approaches for how to build different components of that framework.

No book can fully prepare you. That takes practice. But Rebuilding Rails can start you on that practice and show you how to practice. Nobody understands frameworks like an engineer who has built a framework. That, dear reader, could be you.

What You'll Learn

Every chapter of Rebuilding Rails shows you how to build one system of a Rails-like MVC framework. What are those systems?

  • Chapter One: the Gem, the Gemfile, the Framework
  • Chapter Two: Controllers
  • Chapter Three: Automatic Class and File Loading
  • Chapter Four: Views and Templating
  • Chapter Five: Models
  • Chapter Six: Rack Requests and Responses
  • Chapter Seven: ORMs and Database-Backed Models
  • Chapter Eight: Advanced Rack for All Frameworks
  • Chapter Nine: Advanced Routing with a DSL

Every chapter teaches you more Ruby magic, which makes Rails more transparent. At 178 pages, the book will keep you busy for awhile. Each chapter convers the basic material and several exercises as well as pointers into the Ruby on Rails source code.

Here is the full table of contents.

You'll also get access to the Software Technique Slack community. It's a great place to ask questions of the author and of other rebuilders.

Want to use Rebuilding Rails for a book club? It works great for that. I've done it several times, myself. Here are some recommendations for how to do that.

Is Rebuilding Rails for Me?

You should rebuild if:

  • You're an intermediate Rails programmer and want to go deeper into Ruby and/or Rails
  • You want to contribute to Rails, but don't know how to start
  • You love to know how everything works
  • You want to learn at your own pace, but blog posts are just too shallow

Do NOT buy if:

  • You won't actually type and run the code! — you only get better if you do the work!
  • You're entirely new to Ruby
  • You want an API guide, not structural rebuilding or fundamentals.
  • You try the sample chapters and don't learn from them

Worried that you need more Ruby or Rails practice first? Michael Hartl's well-known Rails Tutorial is excellent — far more than you actually need to understand Rebuilding Rails. There's also a free older version online. Or you can work through the sample chapters of Rebuilding Rails and see how much you learn from them.

You'll Have My Support

I've written a lot of great information for you and tested it with my beta audience of hundreds of dedicated readers and programmers. You'll also get my personal email address. I read every message you send. Email me before your purchase and after it. I love hearing from readers.

I want more people to understand Ruby and Rails. I'll help you.

Still, I know many people don't want to interrupt me at my personal email address. And some day, I may not have enough time to talk to everybody. And so there is now a Slack workspace for buyers of Rebuilding Rails and Mastering Software Technique. Your purchase of Rebuilding Rails entitles you to lifetime membership in that community (assuming you uphold reasonable standards of behaviour.)

Is Rebuilding Rails Good?

"I thought it was great! Knowing how your tools work under the hood is the best way to understand and master them, and that's exactly what Rebuilding Rails does. I really liked how you focused on one piece at a time while providing exercises and context from Rails. Great stuff."

- Jesse Storimer, Author of Working with Unix Processes
"I'm the type of developer that likes to know how things tick at a very deep level.

I've always wanted a book like this.. an intro to really diving deep with rails."

- Kirk Quesnelle
"Okay, damn you, you win! I'll buy the book: the exercises are just too good. Your preference for extracting and examining information usually left implicit is perfect for me. You write as though your audience has minimal knowledge and limitless intelligence."

- Eli, Test Engineer
"If you've ever wanted to understand the internals of Rails better, this is a good place to start because basically you go through and rewrite your own version of Rails — and you know, it is a simplified version of Rails — but you will learn basically how it works and how the router works and how controllers work together with view and stuff like that and you learn it by rewriting it yourself. So I recommend that."

- Avdi Grimm, author of Confident Ruby

Satisfied Customers from Hundreds of Organisations, Including

About the Author

Noah Gibbs (that's me) is a well-known international conference speaker who has spoken at RubyConf, RailsConf, RubyKaigi and many more. Noah spent years as a principal engineer, tech lead, architect, Ruby Fellow and more. His work on Ruby performance appeared regularly for years in Ruby Weekly. He has extensive teaching and mentoring experience in Ruby and outside it.

Interested but Not Sure Yet?

I'd love to sign you up for the first few chapters of Rebuilding Rails and an email class about Ruby on Rails internals, for free. If you like the sample chapters then please consider buying the full version later on.

Usually there would be a signup form here, but I'm switching email providers. Check back in a few days!

Start Rebuilding for $39.99

Buy on Gumroad

Gumroad offers payment via credit cards and PayPal. If you aren't 100% satisfied then get a full refund with no questions asked within 60 days.

Want to get Rebuilding Rails reimbursed by your employer? Great! Gumroad offers invoices.

You can also contact me about site licenses.


Why You Should Expense Rebuilding Rails

You're a software developer. Your time is expensive. If you don't live in the USA, Rebuilding Rails still only costs several hours of your salary — in the United States, the plain ebook may cost around fifteen minutes of what the business actually pays to keep you.

If Rebuilding Rails makes you just two percent better at what you do in Rails and you stay with your current employer for just two more months, then RR has made a tidy profit for your employer. Each post-Rebuilding-Rails year you work there (say 50 weeks of work at 40 hours/week) with a two percent improvement will have saved 40 hours of your debugging time to be used on more interesting work, or made you 40 hours more effective at framework-related features. That's worth far more than the price of the book. By expensing Rebuilding Rails and reading it, you're doing your employer a huge favour.

To do them even more of a favour, you could pick up a site license (multiple book licenses) and share with your coworkers! I also teach workshops, both in person and online.


A chimpanzee types and wears headphones, while a teddy bear records him with a camcorder.
Writing with love and care from my studio in Inverness, Scotland