johnbintz/rack-livereload

Browser connects, but no reload happens

Closed this issue · 2 comments

Hi,

The guard output sais the browser has connected and it discovers when files has changed.
But the browser will not reload.

Any idea what might be wrong? I could not see any new JavaScript being injected in the HTML header, when I inspected that. Should it?

$ guard
Guard could not detect any of the supported notification libraries.
Guard is now watching at '/Users/martins/Work/martinstabenfeldt.no'
LiveReload 1.6 is waiting for a browser to connect.

Then I refresh brower at http://0.0.0.0:3000/

Reloading browser: public/javascripts/translations.js

If i change one of the files...

Reloading browser: app/stylesheets/pages/_about.sass

But still, no refreshing is done of the page. Tried with both Safari and Chrome. :(

Gemfile:

group :development do
  gem 'guard'
  gem 'growl'
  gem 'guard-livereload'
end

Guardfile

guard 'livereload', :apply_css_live => true, :apply_js_live => true, :host => '127.0.0.1'  do
  watch(%r{app/views/.+\.(erb|haml|slim)})
  watch(%r{app/helpers/.+\.rb})
  watch(%r{public/.+\.(js|html)})
  watch(%r{config/locales/.+\.yml})
  # Rails Assets Pipeline
  watch(%r{(app|vendor)/assets/\w+/(.+\.(css|js|html)).*})  { |m| "/assets/#{m[2]}" }
  watch(%r{app/stylesheets/layout/.+\.sass})
  watch(%r{app/stylesheets/pages/_about.sass})
end

Cheers,
Martin

Dumb question time: Are you loading the Rack middleware?

config/environments/development/rb:

YourApplication.configuration do |config|
  config.middleware.insert_before(Rack::Lock, Rack::LiveReload, :blah => :blah)
end

Yes, I´m a retard!
Thanks! :-)

On Sunday, June 10, 2012 at 3:09 PM, John Bintz wrote:

Dumb question time: Are you loading the Rack middleware?

config/environments/development/rb:

YourApplication.configuration do |config|
config.middleware.insert_before(Rack::Lock, Rack::LiveReload, :blah => :blah)
end