Grunt sass task fails within grunt tab, but not on terminal

Hi,

I've set up a grunt task that works fine in my Ubuntu computer. It compiles, minifies and so on without any problem. However, using the PHPStorm 8 Grunt tab, I get this error:

Running "sass:main" (sass) task
Warning: You need to have Ruby and Sass installed and in your PATH for
this task to work. More info:
https://github.com/gruntjs/grunt-contrib-sass  Use --force to continue.

I do NOT get that error in a regular terminal, nor in PhpStorm's embedded one.

Any thoughts?

5 comments
Comment actions Permalink

Hi there,

Try launching PhpStorm from terminal instead of launcher/icon. Will it be any difference?

0
Comment actions Permalink

Yes, it works fine. Is there  a way to solve it for the launcher?

0
Comment actions Permalink

If you're using bash as shell, workaround could be the the following:  edit your PhpStorm launcher and set command to "/bin/bash -l -c  "/path/to/phpstorm.sh". This command will perform bash login (i.e.  reading your .bashrc/.bash_profile files) and after that will run phpstorm.sh.

0
Comment actions Permalink

If you are using bash -- yes (check links below). If another shell (e.g. zsh etc) then maybe you can implement something similar yourself.

If you're using bash as shell, workaround could be the the following: edit your WebStorm launcher and set command to "/bin/bash -l -c "/path/to/webstorm.sh". This command will perform bash login (i.e. reading your .bashrc/.bash_profile files) and after that will run webstorm.sh.

(just use correct product name/file name: i.e. phpstorm.sh instead of webstorm.sh)

0
Comment actions Permalink

Thanks both of you, it worked :)


Only note, I had to include an extra ":

"/bin/bash" -l -c  "/path/to/phpstorm.sh"

instead of

"/bin/bash -l -c  "/path/to/phpstorm.sh"

0

Please sign in to leave a comment.