4

I'm trying to use Guard with LiveReload plugin for Chrome on Windows 7. It's not working and I don't know how I can trouble shoot this really. I'm using Bash to initiate guard, then activating LiveReload in the browser.

This is what it tells me:

$ guard
17:42:43 - INFO - Guard is using TerminalTitle to send notifications.
17:42:43 - INFO - Guard is now watching at 'c:/wamp/www/test'
17:42:43 - INFO - LiveReload is waiting for a browser to connect.
  Please add the following to your Gemfile to avoid polling for changes:
    require 'rbconfig'
    gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwi
n/i

[Listen warning]:

[1] guard(main)> 17:43:14 - INFO - Browser connected.
17:43:14 - INFO - Browser connected.
17:43:22 - INFO - Sass [0.01s] styles.scss -> styles.css
←]2;[Guard::Sass] styles.scss -> styles.css
17:43:23 - INFO - Reloading browser: css/styles.css
17:43:33 - INFO - Sass [0.00s] styles.scss -> styles.css
←]2;[Guard::Sass] styles.scss -> styles.css
17:43:34 - INFO - Reloading browser: css/styles.css
09:00:34 - INFO - Sass [0.01s] styles.scss -> styles.css
←]2;[Guard::Sass] styles.scss -> styles.css
09:00:35 - INFO - Reloading browser: css/styles.css
[1] guard(main)>

So, it says it is reloading the browser. But nothing is happening. Any ideas about what could be wrong here?

Johan Dahl
  • 1,672
  • 3
  • 19
  • 35
  • 2
    Try running guard with the debug flag to get more info (`guard --debug`). – d_rail Nov 20 '13 at 00:41
  • I was having the same issue. Just downloaded the Firefox extension, and LiveReload is working fine in FF. Could it be a problem with the Chrome extension? – stephen.hanson Dec 07 '13 at 23:12
  • 1
    I just figured out my Chrome extension wasn't working because I needed to check "Allow access to file URLs" in the extension settings. Works fine for me now. Looks like you're running on a web server, so probably not your problem. – stephen.hanson Dec 08 '13 at 03:22
  • did you find an answer to this problem? – François Romain Dec 01 '14 at 04:15

2 Answers2

1

Hi I think that the thing which you need is to install a livereload extention for you browser. this one is for google chrome

https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei

thant after runing the command guard

click on the livereload icon : enter image description here

Good luck

gounane
  • 381
  • 2
  • 6
1

d_rails's comment helped me: use

guard --debug

In my case, I saw:

21:34:51 - ERROR - Guard::LiveReload failed to achieve its <start>, exception was:
> [#cddd037a00ab] RuntimeError: no acceptor (port is in use or requires root privileges)

Oddly, the output is ERROR, not debug. I have no clue why that's not important enough to show if --debug is not specified.

To find out what was using that port, I ran (for Ubuntu 14.04) lsof -i :35729 (the default port of livereload) and found out that my Sublime Text livereload plugin was already using that port. I decided to change the port used by my ruby app with livereload. In my guardfile, I used:

guard :livereload, port: 12345 do
  ...
end
Tyler Collier
  • 11,489
  • 9
  • 73
  • 80