Ruby 1.8.4 causes script errors and invalid chars in RHTML

All,

This little bug caused me an hour so I thought I’d save others from it.
I upgraded to Rails 1.1RC and Ruby 1.8.4RC for Windows. 90% of the app
was working fine but a few RHTML templates were throwing a compile
error, with parse errors and invalid chars.

The culprit, tabs. Turns out Ruby 1.8.2 with Rails 1.0 didn’t care about
tabs in your templates but the new combination does. Ruby 1.8.2 with
Rails 1.1 also works. Anyway, replace tabs with spaces and you’re good
to go.

If you are using RadRails, use “Edit->Format tabs” or Ctrl+Shift+F.

  • Zak