Suggestions appear as you type. Use the up and down arrows to choose one and Enter to open it.

This page's audience our own tag's counts — open to see them
–Visits
–Page views
–Clicks to vendors
–Time on page
–Reading now
Clicks to vendors, by tool
  • –
Top countries
  • –
Devices
  • –

– · visits, page views and clicks counted by our own tag, which counts more than our checked analytics; every figure rounded down · how we count

ERB review

Free#12 of 65 in Template Engine Software

A free Ruby library for evaluating template tags and generating strings.

8.3/10Editor score
ERB8.3 Visit Ruby

Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026

ERB is a template processor included in Ruby’s standard library. It takes plain-text templates with Ruby expression tags, executable code, and comments, then evaluates the resulting Ruby code to produce a string. That makes it a fit for Ruby developers who want to generate text from templates within Ruby applications or scripts, including plain text and HTML. It is a developer library, not a hosted service.

The central capability is embedding Ruby directly in a template. A supplied binding lets a template access local variables and constants, while templates can also define methods, modules, and classes. This gives ERB a code-generation syntax model and room for logic beyond simple value insertion. It also means ERB is best suited to teams already comfortable placing executable Ruby in templates; developers seeking a language-neutral or strictly declarative template format should consider a different engine.

ERB is free and open source, and is distributed under Ruby’s free-software licensing terms. It is self-hosted as part of the Ruby development environment rather than offered as a hosted service. Encoding controls and configurable whitespace trimming address output-formatting needs, but ERB’s focus remains Ruby template processing. Choose it when Ruby integration and direct access to Ruby values matter more than a broad cross-language feature set; look elsewhere if the project needs a hosted workflow or templates independent of Ruby.

ERB pros and cons

  • Where it wins
    • Processes Ruby expressions, executable code, and comment tags in templates
    • Bindings expose local variables and constants to templates
    • Supports encoding settings and configurable whitespace trimming
  • Where it doesn't
    • Focused on Ruby rather than templates for other programming languages
    • Templates can execute Ruby code, so they are not just declarative markup
    • A developer library, not a hosted template service

ERB fact sheet, pricing and score →

Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.

Last updated · How we research and update