Posted over 6 years ago. Visible to the public.

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

This error can happen in Ruby 1.9.

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

Copy
<%# @encoding: UTF-8 %>
Growing Rails Applications in Practice
Check out our new e-book:
Learn to structure large Ruby on Rails codebases with the tools you already know and love.

Owner of this card:

Avatar
Henning Koch
Last edit:
over 6 years ago
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Henning Koch to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more