Search code examples
cssdeploymentcapistranoassetsvoltrb

InvalidByteSequenceError deploying Volt via Intercity


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?


Solution

  • 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.