invalid byte sequence in US-ASCII Rails 2.3.10

Hi,

I just updated my rails app from 2.3.5 -> 2.3.10 and started hitting this utf-8 encoding issue in my some views. The views use gsub and trunacate ruby functions.

invalid byte sequence in US-ASCII /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.10/lib/active_support/core_ext/object/blank.rb:68:in `=~'

recmend@recmend:~/recmend/featureblogr$ rails -v Rails 2.3.10 recmend@recmend:~/recmend/featureblogr$ ruby -v ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux] recmend@recmend:~/recmend/featureblogr$

recmend@recmend:~/recmend/featureblogr$ gem -v 1.5.2

Any help on fixing this issue is appreciated.

You may need to do more extensive changes at the DB connector level and your configuration but try this for a quick fix. Add to the the top of your breaking views:

<%# coding: UTF-8 %>

Harry