Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sass --watch does not detect changes to files in directory #92

Closed
jgorset opened this issue May 23, 2011 · 17 comments
Closed

sass --watch does not detect changes to files in directory #92

jgorset opened this issue May 23, 2011 · 17 comments
Labels
bug Something isn't working

Comments

@jgorset
Copy link

jgorset commented May 23, 2011

$ sass --version
Sass 3.1.1 (Brainy Betty)
$ ls -la static/
drwxrwxrwx   7 administrator  administrator  238 May 23 11:29 .
drwxr-xr-x  22 administrator  administrator  748 May 23 11:26 ..
drwxrwxrwx   2 administrator  administrator   68 May 19 15:42 coffee
drwxrwxrwx   7 administrator  administrator  238 May 23 11:25 css
drwxrwxrwx   6 administrator  administrator  204 May 23 11:12 img
drwxrwxrwx   2 administrator  administrator   68 May 19 15:42 js
drwxrwxrwx   4 administrator  administrator  136 May 23 11:25 sass
$ sass --watch static/sass:static/css --trace
>>> Sass is watching for changes. Press Ctrl-C to stop.
  overwrite static/css/home.css

SASS detects changes in the directory upon launching, but does not detect changes at runtime. I should note that watching individual files works fine.

@chriseppstein
Copy link

what gems do you have installed?

@jcode
Copy link

jcode commented May 24, 2011

same problem this is my gem list

*** LOCAL GEMS ***

aaronh-chronic (0.3.9)
aasm (2.2.0)
abstract (1.0.0)
actionmailer (3.0.3, 2.3.11, 2.3.10, 2.3.9, 2.3.8)
actionpack (3.0.3, 2.3.11, 2.3.10, 2.3.9, 2.3.8)
activemodel (3.0.3)
activerecord (3.0.3, 2.3.11, 2.3.10, 2.3.9, 2.3.8)
activeresource (3.0.3, 2.3.11, 2.3.10, 2.3.9, 2.3.8)
activesupport (3.0.3, 2.3.11, 2.3.10, 2.3.9, 2.3.8)
acts_as_list (0.1.2)
acts_as_tree (0.1.1)
addressable (2.2.4, 2.2.2)
arel (2.0.4)
authlogic (2.1.6)
aws-s3 (0.6.2)
blankslate (2.1.2.3)
bson (1.2.0, 1.0.9)
bson_ext (1.2.0)
builder (3.0.0, 2.1.2)
bundler (1.0.10, 1.0.7)
bundler08 (0.8.5)
capybara (0.4.1.1)
carmen (0.1.1)
celerity (0.8.7)
cgi_multipart_eof_fix (2.5.0)
childprocess (0.1.6)
classifier (1.3.3)
crack (0.1.6, 0.1.5)
cucumber (0.10.0)
cucumber-rails (0.3.2)
culerity (0.2.15)
daemon_controller (0.2.6)
daemons (1.1.0, 1.0.10)
database_cleaner (0.6.1)
db-charmer (1.6.13)
diff-lcs (1.1.2)
directory_watcher (1.4.0)
durran-validatable (2.0.1)
erubis (2.6.6)
eventmachine (0.12.10)
extlib (0.9.15)
factory_girl (1.3.3)
fakeweb (1.3.0)
faraday (0.5.4, 0.4.6)
faraday_middleware (0.3.2)
fast-stemmer (1.0.0)
fast_xs (0.8.0)
fastercsv (1.5.4)
fastthread (1.0.7)
ffi (0.6.3)
fgraph (0.5.1)
fleakr (0.7.1)
garb (0.6.0)
gem_plugin (0.2.3)
geokit (1.5.0)
gherkin (2.3.3)
happymapper (0.3.0)
hashie (1.0.0, 0.2.2, 0.1.8)
hoptoad_notifier (2.4.4, 2.3.12)
hpricot (0.8.3, 0.6)
httparty (0.5.2, 0.4.5)
i18n (0.4.2, 0.3.7)
jekyll (0.10.0)
jferris-mocha (0.9.8.20100526112143)
jnunemaker-validatable (1.8.4)
json (1.4.6)
json_pure (1.5.1, 1.4.6)
libxml-ruby (1.1.4, 1.1.3)
liquid (2.2.2)
loggable (0.3.0)
mail (2.2.10)
maruku (0.6.0)
mime-types (1.16)
mongo (1.2.0, 1.0.9)
mongo_mapper (0.8.6)
mongoid (1.9.2)
mongrel (1.1.5)
multi_json (0.0.5)
multi_xml (0.2.2)
multipart-post (1.1.0)
mustache (0.12.0)
mysql (2.8.1)
newrelic_rpm (2.13.3)
nokogiri (1.4.4)
oauth (0.4.4, 0.4.3, 0.3.5)
oauth-plugin (0.3.14)
oauth2 (0.1.1, 0.0.13)
paperclip (2.3.8)
passenger (3.0.7)
plucky (0.3.6)
polyglot (0.3.1)
rack (1.2.1, 1.1.0)
rack-cache (1.0)
rack-mount (0.6.13)
rack-test (0.5.7, 0.5.6)
rails (2.3.11, 2.3.10, 2.3.9, 2.3.8)
railties (3.0.3)
rake (0.8.7)
rakismet (0.4.2)
RedCloth (4.2.2)
relevance-rcov (0.9.2.1)
rsolr (1.0.0.beta5, 0.12.1)
rsolr-ext (0.12.1, 0.12.0)
ruby-hmac (0.4.0)
ruby-openid (2.1.8)
rubygems-update (1.3.7)
rubyzip (0.9.4)
sanitize (2.0.0)
sass (3.1.1)
searchlogic (2.4.27)
selenium-webdriver (0.1.2)
shoulda (2.10.3)
simple_oauth (0.1.4)
sluggable (0.1.1)
sproutcore (1.4.4)
stomp (1.1.3)
syntax (1.0.0)
term-ansicolor (1.0.5)
thin (1.2.7)
thor (0.14.6)
treetop (1.4.9)
truncate_html (0.4.0)
twitter (1.2.0, 0.9.8)
tzinfo (0.3.23, 0.3.16)
validation_reflection (0.3.8)
video_info (0.2.4)
whenever (0.6.7)
will_paginate (2.3.15)
xml-simple (1.0.12)
xpath (0.1.3)
ya2yaml (0.26)
yajl-ruby (0.7.9)

@chriseppstein
Copy link

@jcode does installing the latest fssm fix the issue?

@rriveras
Copy link

Hi, chriseppstein!
We (jcode and I) are using the latest FSSM version: 0.2.7

It's a very odd problem.
We tried on different platforms (OSX, Linux) with the same result.
The only thing that I get from the console is:
>>> Sass is watching for changes. Press Ctrl-C to stop.

@jcode
Copy link

jcode commented May 25, 2011

I think that my problem was a recursive partial invocation.

*jgorset * try the -C option (avoid the cache use)

@jgorset
Copy link
Author

jgorset commented May 25, 2011

Thanks @jcode, but -C does't do anything for me.

I've discovered that using SASS under Ruby 1.9.2 instead of Mac OS X's bundled Ruby 1.8.7 remedies the issue, however.

$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
$ gem list --local

*** LOCAL GEMS ***

actionmailer (2.3.5, 2.2.2, 1.3.6)
actionpack (2.3.5, 2.2.2, 1.13.6)
actionwebservice (1.2.6)
activerecord (2.3.5, 2.2.2, 1.15.6)
activeresource (2.3.5, 2.2.2)
activesupport (2.3.5, 2.2.2, 1.4.4)
acts_as_ferret (0.4.3)
capistrano (2.5.2)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
dnssd (0.6.0)
fastthread (1.0.1)
fcgi (0.8.7)
ferret (0.11.6)
gem_plugin (0.2.3)
highline (1.5.0)
hpricot (0.6.164)
less (1.2.21)
libxml-ruby (1.1.2)
mongrel (1.1.5)
mutter (0.5.3)
needle (1.3.0)
net-scp (1.0.1)
net-sftp (2.0.1, 1.1.1)
net-ssh (2.0.4, 1.1.4)
net-ssh-gateway (1.0.0)
polyglot (0.3.1)
rack (1.0.1)
rails (2.3.5, 2.2.2, 1.2.6)
rake (0.8.3)
RedCloth (4.1.1)
ruby-openid (2.1.2)
ruby-yadis (0.3.4)
rubynode (0.1.5)
sass (3.1.1)
sqlite3-ruby (1.2.4)
termios (0.9.4)
treetop (1.4.8)
xmpp4r (0.4)

$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]
$ gem list --local

*** LOCAL GEMS ***

aaronh-chronic (0.3.9)
abstract (1.0.0)
actionmailer (3.0.7, 3.0.5, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 2.3.8)
actionpack (3.0.7, 3.0.5, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 2.3.8)
activemodel (3.0.7, 3.0.5, 3.0.3, 3.0.2, 3.0.1, 3.0.0)
activerecord (3.0.7, 3.0.5, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 2.3.8)
activeresource (3.0.7, 3.0.5, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 2.3.8)
activesupport (3.0.7, 3.0.5, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 2.3.8)
arel (2.1.0, 2.0.9, 2.0.7, 2.0.6, 2.0.2, 2.0.1, 1.0.1)
authlogic (3.0.2, 2.1.6)
builder (3.0.0, 2.1.2)
bundler (1.0.12, 1.0.10, 1.0.7, 1.0.5, 1.0.3, 1.0.2, 1.0.0)
chronic (0.3.0, 0.2.3)
concerned_with (0.1.0)
configuration (1.2.0)
crack (0.1.8)
daemons (1.1.3, 1.1.0, 1.0.10)
erubis (2.7.0, 2.6.6)
eventmachine (0.12.10)
gem_plugin (0.2.3)
github (0.6.2, 0.6.0, 0.4.5, 0.4.3)
haml (3.1.1, 3.0.25, 3.0.24, 3.0.23, 3.0.22, 3.0.21, 3.0.18)
highline (1.6.1, 1.5.2)
hoe (2.9.4, 2.9.1, 2.8.0, 2.7.0, 2.6.2)
hpricot (0.8.4, 0.8.3, 0.8.2)
htty (1.3.3, 1.3.1, 1.2.1, 1.1.5, 1.1.2, 1.1.1)
i18n (0.5.0, 0.4.2, 0.4.1)
json (1.5.1, 1.4.6)
json_pure (1.5.1, 1.4.6)
launchy (0.4.0, 0.3.7)
mail (2.3.0, 2.2.15, 2.2.13, 2.2.11, 2.2.9.1, 2.2.9, 2.2.6.1)
meme_generator (1.9, 1.8)
mime-types (1.16)
mongrel (1.2.0.pre2)
mysql (2.8.1)
mysql2 (0.3.2, 0.2.6, 0.2.4)
nokogiri (1.4.4)
polyglot (0.3.1)
rack (1.2.2, 1.2.1, 1.1.0)
rack-mount (0.7.1, 0.6.14, 0.6.13)
rack-test (0.5.7, 0.5.6)
rails (3.0.7, 3.0.5, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 2.3.8)
railties (3.0.7, 3.0.5, 3.0.3, 3.0.2, 3.0.1, 3.0.0)
rake (0.8.7)
rb-appscript (0.6.1, 0.6.0, 0.5.3)
rmagick (2.13.1)
ruby-prof (0.10.6, 0.9.2)
rubyforge (2.0.4)
rubygems-update (1.7.2, 1.6.2, 1.6.0, 1.5.0, 1.4.1)
simple-navigation (3.2.0, 3.1.1, 3.1.0, 3.0.2, 3.0.0)
terminitor (0.5.2, 0.4.1, 0.3.2, 0.3.1, 0.2.2, 0.1.0, 0.0.5)
text-format (1.0.0)
text-hyphen (1.0.0)
thin (1.2.11, 1.2.10, 1.2.8, 1.2.7)
thor (0.14.6, 0.14.4, 0.14.3, 0.14.2, 0.14.0)
treetop (1.4.9, 1.4.8)
trollop (1.16.2)
tzinfo (0.3.27, 0.3.25, 0.3.24, 0.3.23)
whenever (0.6.7, 0.6.2, 0.6.1, 0.5.3, 0.5.0)

Please let me know if you'd like me to try to reproduce the issue with a gem-less install of Ruby 1.8.7 and Ruby 1.9.2.

@jenshedqvist
Copy link

I've got this issue as well, removing/disabling cache doesn't help. Watch doesn't detect changes in any of my projects.
Im using Windows 7 64-bit and my projects are under Subversion if that's relevant.

C:\wamp\www\prj\stylesheets>ruby --version
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]

C:\wamp\www\prj\stylesheets>sass --version
Sass 3.1.4 (Brainy Betty)

C:\wamp\www\prj\stylesheets>gem list --local

*** LOCAL GEMS ***

addressable (2.2.6)
capybara (1.1.2)
childprocess (0.2.2)
chunky_png (1.2.0)
cmdparse (2.0.2)
coffee-script (2.2.0)
coffee-script-source (1.1.3)
compass (0.11.5, 0.10.6)
evergreen (1.0.0)
execjs (1.2.9)
ffi (1.0.11 x86-mingw32)
fssm (0.2.7)
haml (3.0.24)
json_pure (1.6.1)
juicer (1.0.9, 1.0.8)
launchy (2.0.5)
mime-types (1.17.2)
minitest (1.6.0)
multi_json (1.0.3)
nokogiri (1.4.4.1 x86-mingw32, 1.4.4 x86-mingw32)
rack (1.3.5)
rack-protection (1.1.4)
rack-test (0.6.1)
rake (0.8.7)
rdoc (2.5.8)
rubyzip (0.9.4)
sass (3.1.4)
selenium-webdriver (2.12.2)
sinatra (1.3.1)
tilt (1.3.3)
xpath (0.1.4)

C:\wamp\www\europeiska\erv.se\stylesheets>sass --watch scss/reslider:css/reslider --style :expanded
>>> Sass is watching for changes. Press Ctrl-C to stop.

Now it doesn't work converting at all, not even this:

C:\wamp\www\prj\stylesheets\scss\reslider>sass erv-theme.scss:erv-theme.css --style :expanded -C

Also, if I try to move the above file to another projekc under Compass control it is unable to convert it (but all other files), it just stops:

>>> Compass is polling for changes. Press Ctrl-C to Stop.
>>> Change detected to: erv-theme.scss

@jenshedqvist
Copy link

It seems to be choking on my @moz-keyframe animation. Hmmm.
It can convert this:

@moz-keyframe markersin {
    0% {
        background-position:82% -25%,
                            93% -50%,
                            80% -100%,
                            87% -25%,
                            88% -50%,
                            55% -100%,
                            54% -25%,
                            56% -50%,
                            90% -100%,
                            79% -25%,
                            65% -50%,
                            68% -100%,
                            67% -25%,
                            74% -50%,
                            71% -100%,
                            73% -25%,
                            77% -50%,
                            74% -100%,
                            78% -25%,
                            90% 90%;
    }
    100% {
        background-position:82% 50%,
                            93% 39%,
                            80% 62%,
                            87% 71%,
                            88% 69%,
                            55% 67%,
                            54% -25%,
                            56% -50%,
                            90% -100%,
                            79% -25%,
                            65% -50%,
                            68% -100%,
                            67% -25%,
                            74% -50%,
                            71% -100%,
                            73% -25%,
                            77% -50%,
                            74% -100%,
                            78% -25%,
                            90% 90%;
    }
}
@moz-keyframe markersin2 {
    0% {
        background-position:82% 50%,
                            93% 39%,
                            80% 62%,
                            87% 71%,
                            88% 69%,
                            55% 67%,
                            54% -25%,
                            56% -50%,
                            90% -100%,
                            79% -25%,
                            65% -50%,
                            68% -100%,
                            67% -25%,
                            74% -50%,
                            71% -100%,
                            73% -25%,
                            77% -50%,
                            74% -100%,
                            78% -25%,
                            90% 90%;
    }
    100% {

    }
}
@moz-keyframe markersin3 {
    0% {

    }
    100% {


    }
}

But not this:

@moz-keyframe markersin {
    0% {
        background-position:82% -25%,
                            93% -50%,
                            80% -100%,
                            87% -25%,
                            88% -50%,
                            55% -100%,
                            54% -25%,
                            56% -50%,
                            90% -100%,
                            79% -25%,
                            65% -50%,
                            68% -100%,
                            67% -25%,
                            74% -50%,
                            71% -100%,
                            73% -25%,
                            77% -50%,
                            74% -100%,
                            78% -25%,
                            90% 90%;
    }
    100% {
        background-position:82% 50%,
                            93% 39%,
                            80% 62%,
                            87% 71%,
                            88% 69%,
                            55% 67%,
                            54% -25%,
                            56% -50%,
                            90% -100%,
                            79% -25%,
                            65% -50%,
                            68% -100%,
                            67% -25%,
                            74% -50%,
                            71% -100%,
                            73% -25%,
                            77% -50%,
                            74% -100%,
                            78% -25%,
                            90% 90%;
    }
}
@moz-keyframe markersin2 {
    0% {
        background-position:82% 50%,
                            93% 39%,
                            80% 62%,
                            87% 71%,
                            88% 69%,
                            55% 67%,
                            54% -25%,
                            56% -50%,
                            90% -100%,
                            79% -25%,
                            65% -50%,
                            68% -100%,
                            67% -25%,
                            74% -50%,
                            71% -100%,
                            73% -25%,
                            77% -50%,
                            74% -100%,
                            78% -25%,
                            90% 90%;
    }
    100% {
        background-position:82% 50%,
                            93% 39%,
                            80% 62%,
                            87% 71%,
                            88% 69%,
                            55% 67%,
                            54% 70%,
                            56% 78%,
                            90% 71%,
                            79% 48%,
                            65% 61%,
                            68% 57%,
                            67% 64%,
                            74% -50%,
                            71% -100%,
                            73% -25%,
                            77% -50%,
                            74% -100%,
                            78% -25%,
                            90% 90%;
    }
}
@moz-keyframe markersin3 {
    0% {
        background-position:82% 50%,
                            93% 39%,
                            80% 62%,
                            87% 71%,
                            88% 69%,
                            55% 67%,
                            54% 70%,
                            56% 78%,
                            90% 71%,
                            79% 48%,
                            65% 61%,
                            68% 57%,
                            67% 64%,
                            74% -50%,
                            71% -100%,
                            73% -25%,
                            77% -50%,
                            74% -100%,
                            78% -25%,
                            90% 90%;
    }
    100% {
        background-position:82% 50%,
                            93% 39%,
                            80% 62%,
                            87% 71%,
                            88% 69%,
                            55% 67%,
                            54% 70%,
                            56% 78%,
                            90% 71%,
                            79% 48%,
                            65% 61%,
                            68% 57%,
                            67% 64%,
                            74% 57%,
                            71% 68%,
                            73% 72%,
                            77% 51%,
                            74% 50%,
                            78% 62%,
                            90% 90%;

    }
}


@nex3 nex3 closed this as completed in 8a2a5d3 Dec 17, 2011
@norfali
Copy link

norfali commented May 2, 2012

I have the same exact issue which started happening only since yesterday. I have uninstalled gems, reinstalled Ruby, etc - all with same results.

The only way to make it work was to roll version back to 3.1.5 (Brainy Betty) and all is well. I am on Windows 7 (64-bit) if this helps.

@nex3
Copy link
Contributor

nex3 commented May 2, 2012

@norfali If you install version 3.2.0.alpha.104, does it work?

@norfali
Copy link

norfali commented May 3, 2012

@nex3 Yep I can confirm that 3.2.0.alpha.104 works fine so something somewhere is breaking it in version 3.1.6. :o)

@norfali
Copy link

norfali commented May 8, 2012

The issue seems to have come back - this time affecting 3.2.0.alpha.104 even with brand new project. I have not done any updates since my last comment.

Very strange. O_o Shall/should I open this as a new separate issue?

@nex3
Copy link
Contributor

nex3 commented May 8, 2012

@norfali Do they show up in 3.1.17? There were several fixes to --watch in that release.

@norfali
Copy link

norfali commented May 11, 2012

Yep thanks that version has resolved the issue. Out of interest, what was it with --watch that made it stop working?

@nex3
Copy link
Contributor

nex3 commented May 11, 2012

We switched over to guard/listen and the transition was a little bumpy.

@martypowell
Copy link

@jcode your comment about using the cache option saved me a bunch of time, thanks!

@HarshitChhipa
Copy link

I am having the same issue.
Can you please tell me how to do this.

nex3 pushed a commit that referenced this issue May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants