middleman / middleman-livereload

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

undefined method `ip_address' for nil:NilClass when not connected to internet? #63

Closed SachaG closed 10 years ago

SachaG commented 10 years ago

I've run into this weird error. It seems to only happen if I don't have an internet connection:

= The Middleman is loading
/Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-livereload-3.3.3/lib/middleman-livereload/extension_3_1.rb:10:in `<class:LiveReloadExtension>': undefined method `ip_address' for nil:NilClass (NoMethodError)
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-livereload-3.3.3/lib/middleman-livereload/extension_3_1.rb:5:in `<module:Middleman>'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-livereload-3.3.3/lib/middleman-livereload/extension_3_1.rb:4:in `<top (required)>'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-livereload-3.3.3/lib/middleman-livereload.rb:5:in `require'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-livereload-3.3.3/lib/middleman-livereload.rb:5:in `block in <top (required)>'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-core-3.3.2/lib/middleman-core/extensions.rb:43:in `call'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-core-3.3.2/lib/middleman-core/extensions.rb:43:in `load'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-core-3.3.2/lib/middleman-core/core_extensions/extensions.rb:103:in `activate'
    from /Users/sacha/Dev/tmb/config.rb:138:in `initialize'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-core-3.3.2/lib/middleman-core/core_extensions/extensions.rb:162:in `instance_eval'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-core-3.3.2/lib/middleman-core/core_extensions/extensions.rb:162:in `initialize'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-core-3.3.2/lib/middleman-core/core_extensions/data.rb:35:in `initialize'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-core-3.3.2/lib/middleman-core/application.rb:187:in `initialize'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-core-3.3.2/lib/middleman-core/core_extensions/request.rb:52:in `new'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-core-3.3.2/lib/middleman-core/core_extensions/request.rb:52:in `inst'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-core-3.3.2/lib/middleman-core/preview_server.rb:103:in `new_app'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-core-3.3.2/lib/middleman-core/preview_server.rb:21:in `start'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-core-3.3.2/lib/middleman-core/cli/server.rb:79:in `server'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-core-3.3.2/lib/middleman-core/cli.rb:76:in `method_missing'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/thor-0.19.1/lib/thor/command.rb:29:in `run'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/thor-0.19.1/lib/thor/command.rb:126:in `run'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-core-3.3.2/lib/middleman-core/cli.rb:22:in `start'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/gems/middleman-core-3.3.2/bin/middleman:18:in `<top (required)>'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/bin/middleman:23:in `load'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/bin/middleman:23:in `<main>'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
    from /Users/sacha/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'

Not a huge problem, but I thought I'd make a note of it :)

Arcovion commented 10 years ago

This is fixed in 3.3.4.

SachaG commented 10 years ago

Oh, cool. Sorry about that!