imathis / guard-jekyll-plus

A Guard plugin for smarter Jekyll builds
MIT License
63 stars 16 forks source link

Jekyll-Plus doesn't handle if Thin gem is not installed #45

Open RobertDeRose opened 8 years ago

RobertDeRose commented 8 years ago

If you include:

gem 'rack'

in your Gemfile, then guard-jekyll-plus's rack_available? returns true, which calls start_rack.

This line: thin = s.server == Rack::Handler::Thin causes this error:

23:25:05 - ERROR - Guard::JekyllPlus failed to achieve its <start>, exception was:
> [#0675df75a4ce] LoadError: cannot load such file -- thin
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/rack-1.6.4/lib/rack/handler/thin.rb:1:in `require'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/rack-1.6.4/lib/rack/handler/thin.rb:1:in `<top (required)>'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-jekyll-plus-2.0.2/lib/guard/jekyll_plus/server.rb:89:in `require'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-jekyll-plus-2.0.2/lib/guard/jekyll_plus/server.rb:89:in `start_rack'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-jekyll-plus-2.0.2/lib/guard/jekyll_plus/server.rb:18:in `start'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-jekyll-plus-2.0.2/lib/guard/jekyll_plus.rb:25:in `start'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/runner.rb:82:in `block in _supervise'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/runner.rb:79:in `catch'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/runner.rb:79:in `_supervise'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/runner.rb:22:in `block (3 levels) in run'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/runner.rb:119:in `block (2 levels) in _run_group_plugins'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/runner.rb:117:in `each'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/runner.rb:117:in `block in _run_group_plugins'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/runner.rb:116:in `catch'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/runner.rb:116:in `_run_group_plugins'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/runner.rb:21:in `block (2 levels) in run'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/runner.rb:20:in `each'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/runner.rb:20:in `block in run'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/lumberjack-1.0.10/lib/lumberjack.rb:32:in `unit_of_work'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/runner.rb:18:in `run'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/commander.rb:34:in `start'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/cli/environments/valid.rb:16:in `start_guard'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/cli.rb:122:in `start'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/aruba_adapter.rb:32:in `execute'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/lib/guard/aruba_adapter.rb:19:in `execute!'
> [#0675df75a4ce] /Users/rderose/workspace/developers/vendor/ruby/2.3.0/gems/guard-2.13.0/bin/_guard-core:11:in `<main>'