SASS on Sublime Text 3 - [Decode error - output not utf-8]

扶醉桌前 提交于 2019-12-05 16:46:20
SublimeRecentUser

"shell": true - this is the key.

If I try build-system like this (on WinXP):

{
    "cmd": ["ant", "-f", "project-build.xml"],
    "working_dir": "${project_path}"
}

I get: [Decode error - output not utf-8]
because cmd should be "ant.bat" instead. Sublime is looking for file exacly called ant and encoding of "file does not exist" message is not utf-8. When I use shell like this:

{
    "cmd": ["ant", "-f", "project-build.xml"],
    "working_dir": "${project_path}",
    "shell": true
}

everything works fine (even without "windows": { "cmd": ....} ) because shell searches for ant.exe and then ant.bat.

I've worked around the problem.

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

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

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

Hope that clarifies the process to anyone else!

Just a reference for people who had similar problem and the accepted answer didn't help:

I had a similar error, in my case I had to install python and add it to the PATH environment variable.

add ruby to envirement variable PATH.

I've got this error when I open Sublime Text from a console window. Open Sublime from a normal shortcut.

Just in case someone else comes across this on a different matter, I was building a project in openCL (using C API not C++) and encountered this error.

Turns out I hadn't allocated enough memory for the string to hold the program build log.

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