Erubis Users' Guide

release: 2.7.0

Preface

Erubis is an implementation of eRuby. It has the following features.

  • Very fast, almost three times faster than ERB and about ten percent faster than eruby (implemented in C)
  • File caching of converted Ruby script support
  • Auto escaping support
  • Auto trimming spaces around '<% %>'
  • Embedded pattern changeable (default '<% %>')
  • Enable to handle Processing Instructions (PI) as embedded pattern (ex. '<?rb ... ?>')
  • Multi-language support (Ruby/PHP/C/Java/Scheme/Perl/Javascript)
  • Context object available and easy to combine eRuby template with YAML datafile
  • Print statement available
  • Easy to expand and customize in subclass
  • Ruby on Rails support
  • mod_ruby support|#topcs-modruby

Erubis is implemented in pure Ruby. It requires Ruby 1.8 or higher. Erubis now supports Ruby 1.9.

Table of Contents