Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

compass watch compiles once, fails to notice further changes

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?

like image 321
Yaniv Wainer Avatar asked Aug 31 '14 12:08

Yaniv Wainer


4 Answers

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

like image 173
Flowgram Avatar answered Oct 24 '22 07:10

Flowgram


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
like image 22
Maciek Rek Avatar answered Oct 24 '22 07:10

Maciek Rek


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

like image 14
Yaniv Wainer Avatar answered Oct 24 '22 07:10

Yaniv Wainer


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

like image 1
zal3wa Avatar answered Oct 24 '22 08:10

zal3wa