user3292788
user3292788

Reputation: 417

Sass build issue for sublime text 2 : no file is generated

I've downloaded Ruby and installed Sass. I then installed Sass Build for Sublime Text 2 through the package manager but when I try to build my css file, nothing happens.

It says :

[Decode error - output not utf-8] [Finished in 0.1s with exit code 1]

Does anyone know how to fix this ?

Upvotes: 0

Views: 565

Answers (1)

Robin James Kerrison
Robin James Kerrison

Reputation: 1757

By default, the output encoding in a sublime build is utf-8. This will cause an error if there are non-utf-8 characters in your sass or scss.

You can create a custom sass .sublime-build along the lines of the following by going to Tools > Build System > New Build System.

{

    "cmd": ["sass", "--update", "$file:${file_path}/${file_base_name}.css", "--stop-on-error", "--no-cache"],
    "selector": "source.sass, source.scss",
    "line_regex": "Line ([0-9]+):",

    "osx":
    {
        "path": "/usr/local/bin:$PATH"
    },

    "windows":
    {
        "shell": "true"
    }

    "encoding": "cp1252"
}

Note the key (the only one that'll be surplus from the installed package) "encoding": "cp1252". Its value will have to match that of your source or be a superset thereof. There's a fairly comprehensive list of codecs in the Python docs.

Upvotes: 1

Related Questions