tvooo / sublime-grunt

Moved to https://github.com/sptndc/sublime-grunt
296 stars 35 forks source link

Cannot run Ruby Sass through Sublime #86

Closed Grawl closed 5 years ago

Grawl commented 10 years ago

I trying to launch my existing grunt project with your Sublime plugin and it failed:

Running "sass:server" (sass) task
Error: Invalid US-ASCII character "\xE2"
        on line 168 of /Users/grawl/Sites/<project>/client/bower_components/foundation/scss/foundation/components/_icon-bar.scss
        from line 21 of /Users/grawl/Sites/<project>/client/bower_components/foundation/scss/foundation.scss
        from line 14 of client/styles/_index.sass
        from line 2 of client/styles/main.sass
  Use --trace for backtrace.
Warning: Exited with error code 65 Use --force to continue.

Aborted due to warnings.

If I will launch grunt serve with regular Terminal app it will work. What the heck?

machal commented 9 years ago

Same issue here. Looks SublimeGrunt or a 3rd party tool has problem with horizontal ellipsis () UTF symbol in my SASS source files.

People advise to add @charset "UTF-8"; to the top of problematic files: https://github.com/thoughtbot/bourbon/issues/224

But — does anybody know what is the cause of the problem?

Grawl commented 9 years ago

After some using of IntelliJ-based IDEs I figured that this problem causes because of missing locale variables in current shell.

You can check it:

➜  ~  locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
➜  ~  

But if you have no one en_US.UTF-8 on the right, there is a problem.

So you can just add export LC_ALL=en_US.UTF-8 and/or export LANG=en_US.UTF-8 strings into your .bashrc (or .zshrc if you using ZSH like me) and viola! Problem solved.


But I don't know about Sublime shell. If you cannot fix it with solution from above, you can try to find some .<…>rc file (or with other name, I dunno~) and add locale strings to them.

tvooo commented 9 years ago

That also heavily depends on how you start ST. If you start it from the command line, it should inherit the current environment. But if I start it from the OS X Dock, it doesn't (even the PATH variable is wrong). Can you confirm that it works when ST is started from the command line, @Grawl and @machal ?

tvooo commented 5 years ago

Repository was moved to https://github.com/sptndc/sublime-grunt Please re-file any issues that still exist.