SASS on Sublime Text 3 - [解码错误 - 输出not utf-8] [英] SASS on Sublime Text 3 - [Decode error - output not utf-8]

查看:807
本文介绍了SASS on Sublime Text 3 - [解码错误 - 输出not utf-8]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用sass在sublime text 3今天,我安装了Ruby,Ruby SASS gem和Sublime包Sass和Sass Build。所有似乎都工作很好,但当我尝试建立css文件(使用Sass Build包)我得到这个奇怪的错误:

I've been trying to use sass in sublime text 3 today and for that I installed Ruby, Ruby SASS gem and the Sublime packages Sass and Sass Build. All seems to be working well but when I try to build the css file (using the Sass Build package) I get this weird error:

[Decode error - output not utf-8]
[Finished in 0.1s with exit code 1]
[cmd: ['sass', '--update', 'F:\\Program Files (x86)\\wamp\\www\\singlepage\\wp-content\\themes\\manaca\\style.scss:F:\\Program Files (x86)\\wamp\\www\\singlepage\\wp-content\\themes\\manaca/style.css', '--stop-on-error', '--no-cache', '--style', 'compressed']]
[dir: F:\Program Files (x86)\wamp\www\singlepage\wp-content\themes\manaca]
[path: C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;F:\Program Files (x86)\MacType;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files (x86)\Autodesk\Backburner\]

当我尝试构建压缩的CSS(从同一个包),它只是返回

And when I try to build the compressed CSS (from the same package) it simply returns

[Decode error - output not utf-8]
[Finished in 0.1s]

什么是Bugging我是在最后一行返回的疯狂的文件路径(不应该甚至在C:中搜索)

What's been bugging me is the crazy file paths returned in the last line (shouldn't even be searching in C: )

另一件事我一直在研究about是输出不是utf-8 的东西。即使我在我的sass(或scss)文件中指定了字符集,问题仍然存在。

The other thing I've been researching about is the output not utf-8 thing. Even if I specify the charset on my sass (or scss) file, the problem lingers.

无论如何,我很欣赏任何类型的帮助。

Anyway, I appreciate any type of help I can get.

推荐答案

我已经解决了这个问题。

I've worked around the problem.

我在Windows上安装Ruby的步骤。我需要在环境变量中注册Ruby的路径。

The path thing was a missing step of my Ruby installation on Windows. I needed to register Ruby's path in Environment Variables.

但是Sass Build软件包不工作,所以我打开cmd并告诉Sass观看文件,在我的网站文件夹:

But still the package Sass Build wasn't working so I opened cmd and told Sass to watch the file, inside my website folder:

cd "program files (x86)\..\mysite"
sass --watch style.scss:style.css --style compact --no-cache

现在每次保存style.scss文件css文件已正确更新。

Now every time I save the style.scss file the css file is updated properly.

希望向任何人阐明该过程!

Hope that clarifies the process to anyone else!

这篇关于SASS on Sublime Text 3 - [解码错误 - 输出not utf-8]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆