Set up SCSS File Watcher in PhpStorm (ruby via rvm installed)

It's a little bit tricky. You have to add some additional enviroment variables.

First of all I followed this description. My scss executable is located in "/home/user/.rvm/gems/ruby-1.8.7-p374/bin/scss". I use the rvm, because I need several ruby versions for my projects (in this case ruby 1.8.7). 

A test in the IDE throws a error "/usr/bin/env: ruby_executable_hooks: NO such file or directory". In terminal it works as expected ($> scss test.scss test.css).

In the PhpStorm tutorial I found no solution. But this link point me the right way. You have to set up PATH and GEM_PATH in the file watcher dialog.

In my case:

PATH : /home/carlos/.rvm/gems/ruby-1.8.7-p374/bin

GEM_PATH : /home/carlos/.rvm/gems/ruby-1.8.7-p374

Please replace ( /home/carlos/) with your correct path.


I hope this will help somebody. 

File watcher

Configure the file watcher