0

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....

maioman
  • 18,154
  • 4
  • 36
  • 42
  • 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 Sep 10 '14 at 15:37
  • 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 Sep 10 '14 at 21:56
  • 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 Sep 11 '14 at 13:30

1 Answers1

0

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)_

Community
  • 1
  • 1
maioman
  • 18,154
  • 4
  • 36
  • 42
  • I'd suggest to avoid using such dirty hacks and use another answer from the same thread (use a different path to executable). Note that imports resolving in editor has nothing to do with file watchers - resolving is based on compass support settings, files watchers are not used there is any way – lena Sep 11 '14 at 13:33
  • I tried using a different path but it didn't work ,there a lot of thing that don't work on windows; thanks anyway_ – maioman Sep 11 '14 at 14:26