How to set sass watcher?

I have the following settings:

sass.jpg

But PHPS throws the below errors when I tried to save a sass file:

/Users/roy/.rvm/gems/ruby-2.1.3/bin/sass --no-cache --update style.scss:style.css
env: ruby_executable_hooks: No such file or directory

I'm using rvm. I got that path from `which sass`.
How do I set it correctly?

5 comments
Comment actions Permalink

Please try running the same command from terminal:
- cd to the directory where your style.scss is located
- run /Users/roy/.rvm/gems/ruby-2.1.3/bin/sass --no-cache --update style.scss:style.css

Does it work? If yes, try running PHPStorm in terminal by

open -a /Applications/PhpStorm.app/ - does the problem persist?
0
Comment actions Permalink

Hi thanks for helping to troubleshoot.

There was a problem with the path I specified.
I also don't remember if I installed rvm/sass while PHPS is running so I went ahead and restart it.

So after correcting the path (verified it works in terminal) and doing a restart of PHPS it's working now.
Great!

0
Comment actions Permalink

 

Elena,

I have a similar issue with WebStorm but if I use the terminal to run the code scss works fine. Although I cannot run the watcher from inside webstorm.

However, if as you suggested I run the below

open -a /Applications/Webstorm.app/

The watcher works as expected. I presume this means that WebStorm is unable to access my ENV variables. So I need to link or duplicate. How would I do that?

*Currently looks through documentations*

Thanks
Chris

0
Comment actions Permalink

on MacOSX the environment variables differ between GUI applications and within the terminal. Terminal environment is only available to applications started from terminal. To solve this problem, WebStrom tries to load terminal environment by executing the following command on startup:

<your shell> -l -i -c '/Applications/Webstorm.app/bin/printenv.py'

Seems this command can't retrieve all needed stuff in your case - thus the issue.

Some links you may find useful: http://apple.stackexchange.com/questions/106355/setting-the-system-wide-path-environment-variable-in-mavericks, https://devnet.jetbrains.com/docs/DOC-1160#comment-2801, http://apple.stackexchange.com/questions/51677/how-to-set-path-for-finder-launched-applications.. The problem is that the way to define system-wide environment variables on Mac changes from one version to another (even minor system updates may break your environment)

0
Comment actions Permalink

Thanks for this, it makes a lot of sense and I will make the adjustments when I get time. For now starting from the terminal will get me over the problem short term.

0

Please sign in to leave a comment.