[Ruby on Rails] ArgumentError (invalid byte sequence in US-ASCII)

Tadashi Shigeoka ·  Sun, January 20, 2013

A common error in Ruby on Rails,

ArgumentError (invalid byte sequence in US-ASCII)

The solution is to specify the encoding at the beginning of files that use multibyte characters (like Japanese).

# encoding: utf-8

You tend to forget this after a while.

That’s all from the Gemba.