Rui Jiang
Rui Jiang

Reputation: 1672

Error compiling Rails 3 CSS asset on Heroku

We're getting the following error on random page loads:

Error compiling CSS asset
Encoding::ConverterNotFoundError: code converter not found (US-ASCII to UTF-16BE) (in /app/app/assets/stylesheets/master.css)
/app/.bundle/gems/ruby/1.9.1/gems/sass-3.1.10/lib/sass/util.rb:494 in 'encode'

Rails 3.1 app running on the Bamboo stack. I've never seen this error locally.

Upvotes: 1

Views: 913

Answers (1)

Simone Carletti
Simone Carletti

Reputation: 176552

If you are using the Rails 3.1 pipeline, you need to switch to cedar.

From Heroku documentation:

While Rails 3.1 can run on the Bamboo stack without the asset pipeline, Rails 3.1 runs best on Heroku’s Cedar stack.

Your error seems to be related to an Encoding error in the CSS file. I suggest you to open your file and check the encoding is UTF-8.

Upvotes: 1

Related Questions