Open mhluska opened 9 years ago
Watching... I am seeing the same thing..
+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
Are you all on v3.4.5
?
@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.
Try bundle update
to get the latest versions
@tdreyno latest seems to be 3.4.1
yeah, I thought you were talking about livereload
(which is this bug tracker) not Middleman core
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
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.
I'm doing some issue-gardening 🌿🌷🌾 and came across this issue.
Has this been solved in V4? If so can we close this issue?
Still an issue today. @karland's addition of the :host
param did the trick for me.
Upon changing files, I get one live reload which results in a bunch of
net::ERR_CONNECTION_REFUSED
andnet::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:Gemfile
: https://gist.github.com/mhluska/67661370e223433f1a52Gemfile.lock
: https://gist.github.com/mhluska/dab537340a4a159964efconfig.rb
: https://gist.github.com/mhluska/06698df76350cb77f178