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 is not reloading #76

Open
mhluska opened this issue Aug 13, 2015 · 11 comments
Open

LiveReload is not reloading #76

mhluska opened this issue Aug 13, 2015 · 11 comments

Comments

@mhluska
Copy link

mhluska commented Aug 13, 2015

Upon changing files, I get one live reload which results in a bunch of net::ERR_CONNECTION_REFUSED and net::ERR_CONNECTION_RESET in the console. Subsequent file edits don't trigger a live reload.

Using apply_js_live: false, apply_css_live: false doesn't help.

Ruby version: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin13]
Middleman versions:

middleman (3.4.0)
middleman-blog (3.5.3)
middleman-deploy (1.0.0)
middleman-dotenv (1.1.1)
middleman-livereload (3.4.3)
middleman-sprockets (3.4.2)

Gemfile: https://gist.github.com/mhluska/67661370e223433f1a52
Gemfile.lock: https://gist.github.com/mhluska/dab537340a4a159964ef
config.rb: https://gist.github.com/mhluska/06698df76350cb77f178

@chrishough
Copy link

Watching... I am seeing the same thing..

@amirnissim
Copy link
Contributor

+1 Livereload does not work since 3.4.0 upgrade.
I'm using Pow with updated config.ru, but Livereload does not work with middleman server as well

@tdreyno
Copy link
Member

tdreyno commented Jan 5, 2016

Are you all on v3.4.5?

@amirnissim
Copy link
Contributor

@tdreyno I'm on 3.4.0, is 3.4.5 available?
Could not find gem 'middleman (= 3.4.5) ruby' in any of the gem sources listed in your Gemfile or available on this machine.

@tdreyno
Copy link
Member

tdreyno commented Jan 5, 2016

Try bundle update to get the latest versions

@amirnissim
Copy link
Contributor

@tdreyno latest seems to be 3.4.1

@tdreyno
Copy link
Member

tdreyno commented Jan 6, 2016

yeah, I thought you were talking about livereload (which is this bug tracker) not Middleman core

@chrishough
Copy link

In order to fix this locally, I added this to my config file:

if ENV["LIVERELOAD"]
  configure :development do
    activate :livereload, host: '127.0.0.1', apply_js_live: false, apply_css_live: false
  end
end

and use a rake task to boot up around it:

namespace :server do
  desc 'Work on the site with livereload'
  task :development => ["utilities:build:purge:middleman_files"] do
        msg("Cranking up the development server running on port 4567")
        msg("Open your browser to http://localhost:4567/")
        shell('LIVERELOAD=true middleman server -e development --verbose')
    end

  desc 'Start up the site for binding.pry and no livereload'
  task :development_pry => ["utilities:build:purge:middleman_files"] do
        msg("Cranking up the development server running on port 4567")
        msg("Open your browser to http://localhost:4567/")
        shell('middleman server -e development_pry --verbose')
    end

  desc 'Build the site'
  task :build => ["utilities:build:purge:middleman_files"] do
    msg("Building static files, but I will not be starting the server")
    shell('time middleman build --verbose')
  end
end

@karland
Copy link

karland commented Feb 18, 2016

I had the same problem with middleman-livereload 3.4.6 under Windows with ruby --version,

ruby 2.2.4p230 (2015-12-16 revision 53155) [x64-mingw32]

where livereload did not reload properly. I tried with MM4 and the reload worked smoothly, but other issues keep me from migrating to MM4 right now. However, my livereload started functioning with putting the following into the config.rb:

activate :livereload, :host => "127.0.0.1",
         :livereload_css_target => nil

:livereload_css_target => nil forces a full page refresh as described in the MM documentation für livereload.

@sandstrom
Copy link
Contributor

I'm doing some issue-gardening 🌿🌷🌾 and came across this issue.

Has this been solved in V4? If so can we close this issue?

@typeoneerror
Copy link

Still an issue today. @karland's addition of the :host param did the trick for me.

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

7 participants