JRuby on Rails encoding error

Hello all JRuby Guys and Gals.

I spent a day trying to convert my Rails app from MRI to JRuby.

As I am using Mongoid instead of ActiveRecord i do not have to change
any
gems. And all other gems should be compatible.
For the record here is my Gemfile: https://gist.github.com/1305882

The error that occurs is:
Encoding::CompatibilityError in Pages#show

Showing
*/Users/lisinge/Projects/Rails/mox/app/views/layouts/_menu.html.haml

  • where line # raised:

incompatible character encodings: UTF-8 and ASCII-8BIT

Extracted source (around line #):

Trace of template inclusion: app/views/layouts/application.html.haml

Rails.root: /Users/lisinge/Projects/Rails/mox
And here is the full trace: https://gist.github.com/1305847

As i can see the error is when HAML renders the _menu.html.haml file and
that is because it contains the characters “” in UTF-8

Bet the weird thing is that it works perfect in MRI but not JRuby.

So i hope you guys can help me with this

Thanks in advance
Micke Lisinge
[email protected]

What version of JRuby are you using?

Joe

1.6.4 But tested with 1.6.3 also
Med vnliga hlsningar
Micke Lisinge
[email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs