10

I work with SASS + Compass on Windows 7. I recently upgraded SASS from 3.2.10 to 3.4.2 and Compass from 0.12.2 to 1.0.1. I did the upgrade by uninstalling the old versions and install the new versions using gem uninstall/install in the command prompt.

Now when I make changes to an SCSS file after running compass watch, only the first set of changes is noticed and compiled. After that compass watch just looks like it's watching for changes but in reality no other changes after the first are noticed. I have to terminate (Ctrl+C) and rerun compass watch. Adding --poll to the command doesn't seem to help.

This strange behavior wasn't happening before the upgrade.

How can I fix this?

Yaniv Wainer
  • 402
  • 1
  • 3
  • 12
  • I've noticed this issue as well. They've seriously borked Sass with the past few updates. As soon as the docoupled the listen gem from sass, it hasn't worked right at all. As far as I know, there is no current fix other than trying to roll back Sass to a previous version with Listen. – Trattles Aug 31 '14 at 18:36
  • There is a GitHub issue for this https://github.com/sass/sass/issues/1409 – Colin Bacon Sep 01 '14 at 09:13
  • @trattles For me the issue is with Compass, not with Sass. – Yaniv Wainer Sep 02 '14 at 04:48
  • 1
    Instead, simply using the poll flag worked for me: `compass watch --poll` – Kabir Sarin Jan 08 '15 at 23:07

6 Answers6

14

Turns out the latest version of Compass was the culprit. I uninstalled it and installed version 1.0.0 alpha 13 (I left Sass as is - latest version 3.4.2).

Ran compass watch but that compiled once and terminated itself with a "LoadError on line ['53'] of C: cannot load such file -- wdm..."

I switched to compass watch --poll and now everything is back to normal - Compass watches, compiles, watches, compiles...

Yaniv Wainer
  • 402
  • 1
  • 3
  • 12
5

Uninstall both sass & compass:

gem uninstall sass
gem uninstall compass

Install - sass version 3.4.0

gem install sass -v 3.4.0

Install - compass version 1.0.1

gem install compass

Now you can run

compass watch 

without --poll

Flowgram
  • 246
  • 2
  • 8
  • I'm having the same issue as the original poster, and I've tried your solution but it doesn't work for me. I'm on Yosemite. – eelkedev Nov 06 '14 at 11:46
2

In my case running compass clean helped.

Edit: Managed to completely remove the issue by cd-ing to the working folder (containing the config.rb) and running compass watch from there, rather than giving the compass watch the path as an argument.

cd /path/to/project-dirs
compass watch
Maciek Rek
  • 1,525
  • 2
  • 14
  • 18
  • I vote on this one. Navigating to config.rb file and run compass watch in that directory helped! Thanks Matt! – Kalle Dec 01 '18 at 13:48
1

I've had exactly same problem. Fastest solution, try to downgrade your compass. It works fine for me. I'm using this version https://rubygems.org/gems/compass/versions/1.0.0.alpha.13. Remember to uninstall your gems first (gem uninstall compass). If "compass watch" command will not work, try compass watch --poll

zal3wa
  • 11
  • 2
  • 1
    Thanks! That did the trick. Uninstalled Compass and installed version 1.0.0 alpha 13. _compass watch_ compiled once but them terminated itself with a LoadError... C: cannot load such file -- wdm" Switched to _compass watch --poll_ and it's smooth sailing now. – Yaniv Wainer Sep 02 '14 at 04:45
1

In my case, i was Using winscp for file transfer.
Compass watch didnot detect any changes in modified.

Did all the above mentioned changes but still did not work.
After hours of debugging found that winscp was preserving the file timestamp and that was causing the issue.

To fix that :
1) In your WinSCP go to Option -> Preferences -> Transfer
2) Edit the preset you are using 3) Uncheck the preserve timestamp option.

That's it!! And compass started detecting changes and writing them.

Mrugesh Mistry
  • 1,581
  • 1
  • 9
  • 3
0

One thing that fixed it for me was to put all my default styles in screen.scss and delete style.scss and style.css.

Wp3Dev
  • 2,001
  • 7
  • 38
  • 54