What is the difference between .erb, .rhtml and .html.erb?
Asked
Active
Viewed 1.7k times
1 Answers
85
Nothing, really. It’s just a change of philosophy between Rails 1 and Rails 2. Before Rails 2, you had file.rhtml, file.rxml and file.rjs. In Rails, that changed to file.content_type.template_engine. So with file.html.erb, the content type is html and the template engine is ERb. rxml is now xml.builder and rjs should now (mostly) be js.rjs
In the new rails 3.0 .rhtml files will be unsupported. .html.erb is the new standard.

Mohit Jain
- 43,139
- 57
- 169
- 274
-
8Also, this new philosophy allows you to chain preprocessors. A file get preprocessed in reverse order based on extension. – Cameron E May 18 '13 at 06:40