I've inherited a legacy Rails app that runs on Ruby 1.8.6. I want to upgrade to 1.8.7, but I get weird bugs. One of them was a weird CSS glitch. Here's what happens:
Note how input.html.erb renders <div id="ribbon"> and then a partial. If you look at the output, the partial gets rendered in both versions of Ruby, but the <div id="#ribbon"> gets rendered only in 1.8.6. It appears that the culprit is the small fragment containing a ruby comment <% #end top div %>. If I remove it, both work the same.
Is this an ERB issue and why does switching Ruby versions trigger it?
I've also noticed that and blogged about it here: http://www.valentinmihov.com/2009/07/08/weird_erb_comment_functionalities/
I think that making ruby comments in ERB templates is not a good idea. No clue why is happening though.