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

Livereload not detect modified files #115

Closed
argordmel opened this issue Jul 10, 2014 · 7 comments
Closed

Livereload not detect modified files #115

argordmel opened this issue Jul 10, 2014 · 7 comments

Comments

@argordmel
Copy link

Hi guys!

i init the guard, but not reload browser.

Worked fine before, now that is not passed.

guard_1

guard_2

My PC
S.O. Ubuntu 14.04 64bits
Ruby: ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

Gemfle.lock

GEM
specs:
celluloid (0.15.2)
timers (> 1.1.0)
celluloid-io (0.15.0)
celluloid (>= 0.15.0)
nio4r (>= 0.5.0)
coderay (1.1.0)
em-websocket (0.5.0)
eventmachine (>= 0.12.9)
http_parser.rb (
> 0.5.3)
eventmachine (1.0.3)
ffi (1.9.3)
formatador (0.2.4)
guard (2.6.0)
formatador (>= 0.2.4)
listen (> 2.7)
lumberjack (
> 1.0)
pry (>= 0.9.12)
thor (>= 0.18.1)
guard-livereload (2.3.0)
em-websocket (> 0.5)
guard (
> 2.0)
multi_json (> 1.8)
http_parser.rb (0.5.3)
listen (2.7.1)
celluloid (>= 0.15.2)
celluloid-io (>= 0.15.0)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
lumberjack (1.0.5)
method_source (0.8.2)
multi_json (1.9.2)
nio4r (1.0.0)
pry (0.9.12.6)
coderay (
> 1.0)
method_source (> 0.8)
slop (
> 3.4)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
slop (3.5.0)
thor (0.19.1)
timers (1.1.0)

PLATFORMS
ruby

DEPENDENCIES
guard
guard-livereload

GuardFile

guard 'livereload' do
watch(%r{kumbiaphp/default/app/views/.+.(phtml)$})
watch(%r{kumbiaphp/default/public/css/.+.(css|js|html|phtml)})
watch(%r{kumbiaphp/default/public/javascript/.+.(css|js|html|phtml)})
end

Thanks guys!

@jamesdwellable
Copy link

I'm having what appears to be the same issue. I've seen livereload work once with my current config, so I know it's more than just a simple config issue. The rest of the time, something seems to be wedged. I turned on debugging, but it didn't help.

james@nopalito$ bundle exec guard --debug
17:51:43 - DEBUG - Command execution: emacsclient --eval '1' 2> /dev/null || echo 'N/A'
17:51:43 - INFO - Guard is using TerminalTitle to send notifications.
17:51:43 - DEBUG - Command execution: hash stty
17:51:43 - DEBUG - Guard starts all plugins
17:51:43 - DEBUG - Hook :start_begin executed for Guard::LiveReload
17:51:43 - INFO - LiveReload is waiting for a browser to connect.
17:51:43 - DEBUG - Hook :start_end executed for Guard::LiveReload
17:51:43 - INFO - Guard is now watching at '/Users/james/dwellable'
17:51:43 - INFO - Browser connected.

I can telnet to the standard port, but even just using the escape char without typing anything else the whole thing crashes:

E, [2014-08-11T09:53:57.095200 #11160] ERROR -- : Couldn't cleanly terminate all actors in 10 seconds!
/Users/james/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/guard-livereload-2.3.0/lib/guard/livereload/websocket.rb:12:in `<<': Could not parse data entirely (0 != 3) (HTTP::Parser::Error)
    from /Users/james/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/guard-livereload-2.3.0/lib/guard/livereload/websocket.rb:12:in `dispatch'
    from /Users/james/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/em-websocket-0.5.1/lib/em-websocket/connection.rb:78:in `receive_data'
    from /Users/james/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
    from /Users/james/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
    from /Users/james/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/guard-livereload-2.3.0/lib/guard/livereload/reactor.rb:49:in `_start_reactor'
    from /Users/james/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/guard-livereload-2.3.0/lib/guard/livereload/reactor.rb:11:in `block in initialize'

OS X 10.9.4
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]

I'd add my Gemfile.lock here, but it's very long. Happy to add it if you think it might be helpful. Here's some of the relevant bits:

celluloid (0.15.2)
      timers (~> 1.1.0)
em-websocket (0.5.1)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0.6.0)
eventmachine (1.0.3)
guard (2.6.1)
      formatador (>= 0.2.4)
      listen (~> 2.7)
      lumberjack (~> 1.0)
      pry (>= 0.9.12)
      thor (>= 0.18.1)
guard-livereload (2.3.0)
  em-websocket (~> 0.5)
  guard (~> 2.0)
  multi_json (~> 1.8)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
      ffi (>= 0.5.0)

Any suggestions for further debugging?

@jamesdwellable
Copy link

It seems to start working reliably if I leave it running for ~10 minutes. It eventually gets past whatever is blocking execution at startup.

@thibaudgg
Copy link
Member

Do you have a lot of files in your repo? Try maybe to ignore some of them with: https://github.com/guard/guard#ignore

@jamesdwellable
Copy link

There's only about 300 files in the watch list.

Running or not running doesn't seem to be strictly a patience issue. I've got a guard watch which has been mostly wedged for about 12 hours. It spits out something like this every time the page is reloaded, but otherwise there's no other messages:

18:11:14 - DEBUG - Serving file /Users/james/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/guard-livereload-2.3.0/js/livereload.js

@thibaudgg
Copy link
Member

Ok, maybe try to go through the list here: https://github.com/guard/listen#issues-and-troubleshooting

@nemoDreamer
Copy link
Contributor

This might be caused by #118

@e2
Copy link
Contributor

e2 commented Oct 26, 2015

I'm closing this since a lot has changed since this has opened.

If there's still a problem with a newer version of Guard, Listen (which at 3.x fixes the "terminating ..." problem) and Guard-Livereload, open a new issue.

@e2 e2 closed this as completed Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants