Ruby2html
Ruby2html: write views in Ruby, get escaped, compact HTML
Works standalone, as Rails .html.rb templates, inside ERB and in ViewComponent. Escaped by default.
What it does
Plain Ruby views
Every HTML5 tag is a method. Text and attribute values are escaped, and raw HTML comes only from html_safe strings.
Runs everywhere
CRuby with a C extension and SIMD escaping, JRuby with a Java escaper, and TruffleRuby on pure Ruby, with byte-identical output.
Measured in the open
Its README publishes its benchmarks against ERB, Slim and Phlex, and it ships a one-file reference for coding agents.
Where it stands
A published gem with tagged releases. Its README keeps breaking changes and major releases with the owner, and it lives under the owner’s own GitHub account.
AI-maintainedMITRubyv2.1.0 · 2026-10-31
Read from github.com/sebyx07/ruby2html on 2026-11-02.
Open source
Want to help?
Bug fixes, bug reports and suggestions are welcome. Dependency, CI and release changes, big rewrites and unasked features are not. The page says why.
How outside contributions workShip more. Maintain less.
We expect software to be written faster than any team can review it. Bring your repos, your boxes and your keys. We bring the org that keeps up.
