Rails error: invalid byte sequence in UTF-8


i have a app on rails 3.2.1 and i use a jquery lib called jQuery Timelinr 0.9.5: http://www.csslab.cl/2011/08/18/jquery-timelinr/

but, when i use it on a .erb view, i got a error:

Showing /home/carlos.ribeiro/projetos/amarribo/app/views/conheca/historico.html.erb where line #59 raised:

invalid byte sequence in UTF-8

Extracted source (around line #59):

57: 58: <%= stylesheet_link_tag "timeline" %>
59: <%= javascript_include_tag "timeline/jquery.timelinr-0.9.51" %>
60: 61: <script>
62: $(function(){

but when i remove the line 59, the error stop.

Anybody have an idea about it???


Maybe this help



when i execute this rake task https://gist.github.com/1301199/a19adcb7687f2adfc927c9e8da3d716960833797 , don’t return me errors, all file is ok…

I’ve used this file


I’ve downloaded it and then in irb did

f = File.read("/path/to/jquery.timelinr-0.9.5.js")


=> true


=> #Encoding:UTF-8

maybe there’s a typo in the file you are using (something like the question in stackoverflow)

i’m using this file too…

in irb is ok, but when is in rails, a i got the problem…