Guard doesn't notice changes on Mac

90 views
Skip to first unread message

Rich Lovelock

unread,
Nov 21, 2012, 5:46:17 PM11/21/12
to guar...@googlegroups.com
Hi 

I'm trying to use Guard with Guard Compass or Guard Sass on Mac. Have the following Guardfile:

guard 'compass' do
    watch(%r{public/sass/.+\.(sass|scss)})
end

But it just doesn't respond to changed to the SCSS stylesheet. The same config works on Windows but not on Mac. I'm a relative newbie and spent 2 evening searching Google and not sure what else to try.

Please help

Rich

Rémy Coutable

unread,
Nov 21, 2012, 5:50:46 PM11/21/12
to guar...@googlegroups.com
Hi,

you could try using guard-shell (https://github.com/guard/guard-shell) to see if the problem is that file modification are not detected or if it's something else.

Also, you should run guard in debug mode: guard --debug
and see what is the output.

Regards,
Rémy

Rich Lovelock

unread,
Nov 21, 2012, 6:30:29 PM11/21/12
to guar...@googlegroups.com
Thanks for the advice. So I tried both....

Installed guard-shell and run guard in debug.

Guardfile is:

guard 'compass' do
 watch %r{^sass/(.+\.s[ac]ss)$}
end

guard :shell do
  watch /.*/ do |m|
    m[0] + " has changed."
  end
end

Then still no sign of life using guard-shell. I created a simple test.txt file in the root of the directory Guard is monitoring and edited the file.

Debug doesn't output much. Terminal output:

Last login: Wed Nov 21 23:24:00 on ttys000
unknown-00-26-08-dd-0b-47:~ Rich$ cd /web/guardtest/
unknown-00-26-08-dd-0b-47:guardtest Rich$ guard --debug
23:30:02 - DEBUG - Command execution: emacsclient --eval '1' 2> /dev/null || echo 'N/A'
23:30:02 - INFO - Guard uses TerminalTitle to send notifications.
23:30:02 - INFO - Guard is now watching at '/Web/guardtest'
23:30:02 - DEBUG - Hook :start_begin executed for Guard::Compass
23:30:02 - INFO - Guard::Compass is watching at your stylesheets.
23:30:02 - DEBUG - Hook :start_end executed for Guard::Compass
23:30:02 - DEBUG - Hook :start_begin executed for Guard::Shell
23:30:02 - DEBUG - Hook :start_end executed for Guard::Shell
23:30:02 - DEBUG - Command execution: hash stty
23:30:02 - DEBUG - Command execution: stty -g 2>/dev/null
23:30:02 - DEBUG - Start interactor
[1] guard(main)> 

Any other thoughts?

Rich

Rémy Coutable

unread,
Nov 21, 2012, 6:36:25 PM11/21/12
to guar...@googlegroups.com, guar...@googlegroups.com
I think you have to install rb-readline or something like that, please look at the recent closed issues on https://github.com/guard/guard/issues and at the page that speaks about that in the wiki !

Sent from my iPhone

Rich Lovelock

unread,
Nov 22, 2012, 6:25:09 AM11/22/12
to guar...@googlegroups.com
Ok, I'll give that a go tonight. Feels like it shouldn't be so difficult!
Reply all
Reply to author
Forward
0 new messages