Codekit Encoding::CompatibilityError after upgrading to Mavericks

家住魔仙堡 提交于 2019-12-11 03:58:27

问题


So I just upgraded to Mavericks and now one of my Codekit Compass projects isn't compiling properly. I've getting the following error in Codekit (latest version):

Compass was unable to compile one or more files in the project: 

Encoding::CompatibilityError on line ["28"] of /Applications/CodeKit.app/Contents/Resources/engines/scss/lib/sass/tree/visitors/to_css.rb: incompatible character encodings: ASCII-8BIT and UTF-8
Run with --trace to see the full backtrace

(This action was triggered by a change to lks.scss)

Any ideas anyone? Bit stuck.


回答1:


I also saw that issue. Cracking open the file in question and going to line 28, I saw this:

result << child_str + (node.style == :compressed ? '' : "\n")

So it has something to do with reading either your Compass settings or CSS output settings incorrectly after the upgrade. Switch your output settings to uncompressed, save, then switch back and save again and it should autocorrect.




回答2:


Had this problem to. What fixed it for me was editing the config.rb file for the project, and adding this line:

encoding = "utf-8"

Saving, then quitting and restarting CodeKit.



来源:https://stackoverflow.com/questions/19788561/codekit-encodingcompatibilityerror-after-upgrading-to-mavericks

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!