middleman / middleman-livereload

LiveReload support for Middleman
http://middlemanapp.com
MIT License
117 stars 37 forks source link

Livereload 3.4.4 with Middleman 4.0 rc2/3: "no implicit conversion of Pathname into String" #84

Closed jimothyGator closed 8 years ago

jimothyGator commented 8 years ago

I'm getting the error that follows when using Livereload 3.4.4 with Middleman 4.0 (tested with rc 2 and 3).

I've created a brand new project (middleman init), then updated config.rb to activate livereload. When I run bundle exec middleman server then make a change to (for example) index.html.erb, I get an error.

Reverting to middleman-livereload 3.4.3 in the Gem file resolves the issue.

I have not tested this with Middleman 3.x.

At the time this issue was tested, this also fails with this in my Gemfile:

gem 'middleman-livereload', :git => 'https://github.com/middleman/middleman-livereload.git', :branch => 'master'

Tested on OS 10.11.2, ruby 2.2.3p173 (installed via Homebrew)

The error:

E, [2015-12-14T14:26:17.260806 #80208] ERROR -- : exception while processing events: no implicit conversion of Pathname into String Backtrace:
 -- /Users/USER/.gem/ruby/2.2.3/gems/middleman-livereload-3.4.4/lib/middleman-livereload/extension_3_1.rb:62:in `match'
 -- /Users/USER/.gem/ruby/2.2.3/gems/middleman-livereload-3.4.4/lib/middleman-livereload/extension_3_1.rb:62:in `block (2 levels) in initialize'
 -- /Users/USER/.gem/ruby/2.2.3/gems/middleman-core-4.0.0.rc.3/lib/middleman-core/sources.rb:264:in `call'
 -- /Users/USER/.gem/ruby/2.2.3/gems/middleman-core-4.0.0.rc.3/lib/middleman-core/sources.rb:264:in `block (2 levels) in changed'
 -- /Users/USER/.gem/ruby/2.2.3/gems/middleman-core-4.0.0.rc.3/lib/middleman-core/sources.rb:264:in `each'
 -- /Users/USER/.gem/ruby/2.2.3/gems/middleman-core-4.0.0.rc.3/lib/middleman-core/sources.rb:264:in `block in changed'
 -- /Users/USER/.gem/ruby/2.2.3/gems/middleman-core-4.0.0.rc.3/lib/middleman-core/sources.rb:348:in `call'
 -- /Users/USER/.gem/ruby/2.2.3/gems/middleman-core-4.0.0.rc.3/lib/middleman-core/sources.rb:348:in `block in run_callbacks'
 -- /Users/USER/.gem/ruby/2.2.3/gems/hamster-2.0.0/lib/hamster/vector.rb:1316:in `each'
 -- /Users/USER/.gem/ruby/2.2.3/gems/hamster-2.0.0/lib/hamster/vector.rb:1316:in `traverse_depth_first'
 -- /Users/USER/.gem/ruby/2.2.3/gems/hamster-2.0.0/lib/hamster/vector.rb:431:in `each'
 -- /Users/USER/.gem/ruby/2.2.3/gems/middleman-core-4.0.0.rc.3/lib/middleman-core/sources.rb:341:in `run_callbacks'
 -- /Users/USER/.gem/ruby/2.2.3/gems/middleman-core-4.0.0.rc.3/lib/middleman-core/sources.rb:331:in `did_change'
 -- /Users/USER/.gem/ruby/2.2.3/gems/middleman-core-4.0.0.rc.3/lib/middleman-core/callback_manager.rb:51:in `instance_exec'
 -- /Users/USER/.gem/ruby/2.2.3/gems/middleman-core-4.0.0.rc.3/lib/middleman-core/callback_manager.rb:51:in `block in execute'
 -- /Users/USER/.gem/ruby/2.2.3/gems/hamster-2.0.0/lib/hamster/vector.rb:1316:in `each'
 -- /Users/USER/.gem/ruby/2.2.3/gems/hamster-2.0.0/lib/hamster/vector.rb:1316:in `traverse_depth_first'
 -- /Users/USER/.gem/ruby/2.2.3/gems/hamster-2.0.0/lib/hamster/vector.rb:431:in `each'
 -- /Users/USER/.gem/ruby/2.2.3/gems/middleman-core-4.0.0.rc.3/lib/middleman-core/callback_manager.rb:51:in `execute'
 -- /Users/USER/.gem/ruby/2.2.3/gems/middleman-core-4.0.0.rc.3/lib/middleman-core/callback_manager.rb:28:in `block in install_methods!'
 -- /Users/USER/.gem/ruby/2.2.3/gems/middleman-core-4.0.0.rc.3/lib/middleman-core/sources/source_watcher.rb:256:in `update'
 -- /Users/USER/.gem/ruby/2.2.3/gems/middleman-core-4.0.0.rc.3/lib/middleman-core/sources/source_watcher.rb:219:in `on_listener_change'
 -- /Users/USER/.gem/ruby/2.2.3/gems/listen-3.0.5/lib/listen/event/config.rb:23:in `call'
 -- /Users/USER/.gem/ruby/2.2.3/gems/listen-3.0.5/lib/listen/event/config.rb:23:in `call'
 -- /Users/USER/.gem/ruby/2.2.3/gems/listen-3.0.5/lib/listen/event/processor.rb:115:in `_process_changes'
 -- /Users/USER/.gem/ruby/2.2.3/gems/listen-3.0.5/lib/listen/event/processor.rb:19:in `block in loop_for'
 -- /Users/USER/.gem/ruby/2.2.3/gems/listen-3.0.5/lib/listen/event/processor.rb:15:in `loop'
 -- /Users/USER/.gem/ruby/2.2.3/gems/listen-3.0.5/lib/listen/event/processor.rb:15:in `loop_for'
 -- /Users/USER/.gem/ruby/2.2.3/gems/listen-3.0.5/lib/listen/event/loop.rb:84:in `_wait_for_changes'
 -- /Users/USER/.gem/ruby/2.2.3/gems/listen-3.0.5/lib/listen/event/loop.rb:42:in `block in setup'
 -- /Users/USER/.gem/ruby/2.2.3/gems/listen-3.0.5/lib/listen/internals/thread_pool.rb:6:in `call'
 -- /Users/USER/.gem/ruby/2.2.3/gems/listen-3.0.5/lib/listen/internals/thread_pool.rb:6:in `block in add'
tdreyno commented 8 years ago

Thanks, will check it out.

tdreyno commented 8 years ago

Fixed in v3.4.5