Skip to content


WrongEncodingError on Rails' template #1818

nanaya opened this Issue · 9 comments

7 participants


When a rails' template contains non-ascii, utf-8 character, rbx throws error ActionView::WrongEncodingError even though it works in mri.

steps (assuming latest bundler and rails):

  1. create new rails project
  2. generate scaffold of something (e.g. Post)
  3. insert non-ascii, utf-8 character in one of the view (e.g. '»' to posts/index)
  4. start server
  5. access the view (localhost:3000/posts/) --- here, rbx throws error while mri proceeded as normal


I second on the issue, having same problem. To reproduce, insert any non latin characters into your ERB or HAML view. For example: "Привет, чуваки". This issue is a real blocker, because it prevents any non English speakers from using Rails at all! The only thing that helps is to move all string literals into locale files, but this is not always possible, for example with legacy projects.

I would gladly fix this issue, but I don't know where to look. Any help would be much appreciated.


Doesn't work for me, too :(


same problem


fix it please!


I wonder why nobody cares about this issue, if the issue is not with rubinius, but with other gems, let us know, we really need this one, but it seems it goes unnoticed.

Rubinius member

We care about this issue, but it requires we have more encoding stuff ready, @brixen is working hard on that.

@brixen brixen closed this in 952b52e
Rubinius member

@Valve @IliaForm @dizer @ognevsky thanks for your patience, folks, encodings are an extremely complicated part of Ruby that touches almost everything internally. We're getting there.


@brixen thank you for fixing this.

Rubinius member

@Valve you're welcome! I'm still working on a few encoding issues but please let us know if you run into anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.