Herb on Rails
It finds the tags, evaluates the Ruby inside them, and concatenates everything else as plain text. Broken markup can now fail while the template compiles, instead of reaching a browser.

It finds the tags, evaluates the Ruby inside them, and concatenates everything else as plain text. Broken markup can now fail while the template compiles, instead of reaching a browser.

It finds the tags, evaluates the Ruby inside them, and concatenates everything else as plain text.
Broken markup can now fail while the template compiles, instead of reaching a browser.
you will learn what Herb is, how to audit your own views with it today, what it can fix for you, what it cannot, and…
The page is ready to read now. The fuller skim-friendly version will appear here automatically.
It finds the tags, evaluates the Ruby inside them, and concatenates everything else as plain text. Broken markup can now fail while the template compiles, instead of reaching a browser. you will learn what Herb is, how to audit your own views with it today, what it can fix for you, what it cannot, and…
Whether the result is valid markup has never been its problem.
Originally appeared on The Rails Tech Debt Blog. ERB does not know that it is generating HTML. On August 25, 2026, the Ruby on Rails core team merged Add Herb as an HTML-aware ERB implementation, which brings in Herb, an ERB implementation that parses HTML and ERB into a single syntax tree and uses Prism for the Ruby inside the tags.
Open the app view to save this story, compare related coverage, and continue from the same source.