Enabling ruby syntax highlighting for Emacs html.erb files

emacs

Solution

Check out `web-mode`, which is designed for HTML templating. It can be installed via MELPA or Marmalade. (Note that this is not a way to run `html-mode` and `ruby-mode` simultaneously as you requested; it's a completely different mode. It's also probably your best bet.)

Out of the box, it supports `.html.erb` (and many others), with superficial CSS and JavaScript support (highlighting and indenting).

Problem

I am running Emacs Live with Rinari. In `.erb` files `html-mode` is enabled automatically, however embedded Ruby is not highlighted according to `ruby-mode`. Is there any way to enable both `html-mode` and `ruby-mode` within `.html.erb` files?

Original source