Read more

Fix error "invalid byte sequence in US-ASCII" in .js.erb files

Henning Koch
February 22, 2013Software engineer at makandra GmbH

This error can happen in Ruby 1.9.

Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

To fix it, add the following line to the top of your .js.erb file:

<%# @encoding: UTF-8 %>
Posted by Henning Koch to makandra dev (2013-02-22 14:55)