This error can happen in Ruby 1.9.
To fix it, add the following line to the top of your .js.erb file:
.js.erb
<%# @encoding: UTF-8 %>