The Anatomy of an ERB Rendering Engine @ SF Bay Area Ruby Meetup, July 2026
ERB is one of Ruby’s oldest and most widely used technologies, yet many Ruby developers only have a vague mental model of how it actually works.
In this talk, we take a deep dive into the internals of ERB rendering engines. We start by examining how ERB templates are compiled and executed today, and the design and trade-offs behind traditional engines such as `erb` and `erubi`, especially in context with rendering HTML.
We then explore where this string-based approach breaks down, particularly when it comes to tooling, diagnostics, and more advanced rendering techniques in HTML+ERB templates.
Finally, we look at a different approach: building an HTML-aware ERB engine on top of a syntax tree. Using `Herb::Engine` as a concrete example, we show how adding structural understanding changes what is possible, and what it unlocks next, including better tooling and the foundations for efficient, reactive rendering.
Marco Roth
Annual Pro sale · Save $30
Have presentations of your own?
Share with private links, password protection, and more control over your work.