InvalidByteSequenceError deploying Volt via Intercity

150 Views Asked by At

I don't know how to tell if this is an issue with Volt or Intercity, but while I have successfully deployed other rack apps via Intercity/Capistrano, when I deploy a Volt app, I get errors compiling CSS files when I visit the page.

Encoding::InvalidByteSequenceError "\xE2" on US-ASCII

Happens consistently for .css.scss files, and I've gotten it to stop happening on my own files by converting them all to .scss, but occasionally it happens on other files as well (in particular, at least one in volt-foundation and in volt-font_awesome).

Any idea why?

1

There are 1 best solutions below

0
On BEST ANSWER

This has to do with the encoding. To fix, put these lines at the top of your Gemfile.

Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8

See the article here for a discussion.