编译Heroku上的Rails 3 CSS资源时出错 [英] Error compiling Rails 3 CSS asset on Heroku
问题描述
编译CSS资源时出错
编码:: ConverterNotFoundError:未找到代码转换器(US-ASCII到UTF-16BE)(位于/app/app/assets/stylesheets/master.css)
/app/.bundle/gems/ruby/1.9.1/gems/ sass-3.1.10 / lib / sass / util.rb:'encode'中的494
Rails 3.1应用程序在Bamboo堆栈上运行。我从来没有在本地看到这个错误。
如果您使用的是Rails 3.1管道,则需要切换到雪松。
从 Heroku文档: p>
虽然Rails 3.1可以在没有资产
管道的情况下在Bamboo堆栈上运行,但Rails 3.1在Heroku的Cedar堆栈上运行得最好。
您的错误似乎与CSS文件中的编码错误有关。我建议你打开你的文件,并检查编码是UTF-8。
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.
这篇关于编译Heroku上的Rails 3 CSS资源时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!