0
votes

I'm on Windows7, I've installed Compass and configured it correctly in my project folder.

I'm new to Scss and Compass but when I launch compass watch from CMD my style.scss gets automatically compiled and everything seems fine.

[ver. compass 1.0.1 // sass 3.4.3].

But when I open my style.scss from phpstorm @import "compass" comes up with an error cannot resolve import into sass/scss;

opening up phpstorm's compass support it looks like the default options are correct:

compass executable file: C:\Ruby200-64\bin\compass 
config path: is pointing to local server and is correct

this is my watcher setting:

file watcher setting

I've tried changing it but I can't get compass support to work....

1
what PHPStorm version do you use? Compass support settings (namely 'compass executable file') are different for PHPStorm 7.* and 8. Namely, PHPStorm 7 expects a path to compass gem in Ruby lib, like 'C:\Ruby200\lib\ruby\gems\1.9.1\gems\compass-0.13.alpha.10\bin\compass'; default executable - same as used for compass watcher - won't work there - lena
Phpstorm 7.1.3 ; I tried ...\compass1.0.1\bin\compass but that didn't work, in this folder there's no compass.bat; don't I need to use compass.bat on windows? - maioman
you should not specify compass.bat as compass executable in Settings/Compass in PHPStorm 7.1.3. What path have you tried? After setting the correct executable I’d suggest to re-save the config.rb (just add a white space) to get all stuff re-imported - lena

1 Answers

0
votes

Eventually the only way I found to get it working is creating a Symlink between my sass folder and my compass executable;

I found an old answer on this that helped me...


in detail:

1.Open Cmd (as admin) and change dir to your sass folder in your project .

2.From your sass-folder create a symlink with mklink /d compass C:\Ruby200-64\lib\ruby\gems\2.0.0\gems\compass-1.0.1\bin\compass .

Now phpstorm works fine (with default filewatchers)_