简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM