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?
Please sign in to leave a comment.
Hi there,
Try launching PhpStorm from terminal instead of launcher/icon. Will it be any difference?
Yes, it works fine. Is there a way to solve it for the launcher?
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.
If you are using bash -- yes (check links below). If another shell (e.g. zsh etc) then maybe you can implement something similar yourself.
(just use correct product name/file name: i.e. phpstorm.sh instead of webstorm.sh)
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"