Fastruby iconFastrubySep 22, 2026 ~1 min source read

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.

Herb on Rails

Share this story

Send the public story page.

Useful takeaways from this story.

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…

Building the complete brief

The page is ready to read now. The fuller skim-friendly version will appear here automatically.

The useful part

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…

What to take from it

Whether the result is valid markup has never been its problem.

Details worth keeping

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.

Keep reading in the app

Open the app view to save this story, compare related coverage, and continue from the same source.

Open in app