imathis / guard-jekyll-plus Goto Github PK
View Code? Open in Web Editor NEWA Guard plugin for smarter Jekyll builds
License: MIT License
A Guard plugin for smarter Jekyll builds
License: MIT License
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>'
I'm getting these notification errors, among the ones thath should be there:
21:18:51 - ERROR - Error sending notification with : no implicit conversion of nil into Hash
But everything seems to be working fine. Just thought you should know...
I've installed guard-jekyll-plus using bundler. I'm working with version 1.4.9. When running bundle exec guard init
in a newly created jekyll install I receive the following.
/home/<my_user_>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/plugin/base.rb:53:in `read': No such file or directory - /home/<my_user_>/.gem/ruby/2.0.0/gems/guard-jekyll-plus-1.4.9/lib/guard/jekyllplus/templates/Guardfile (Errno::ENOENT)
from /home/<my_user_>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/plugin/base.rb:53:in `template'
from /home/<my_user_>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/plugin_util.rb:128:in `block in add_to_guardfile'
from /home/<my_user_>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/plugin_util.rb:125:in `open'
from /home/<my_user_>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/plugin_util.rb:125:in `add_to_guardfile'
from /home/<my_user_>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/guardfile/generator.rb:57:in `initialize_template'
from /home/<my_user_>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/guardfile/generator.rb:83:in `block in initialize_all_templates'
from /home/<my_user_>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/guardfile/generator.rb:83:in `each'
from /home/<my_user_>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/guardfile/generator.rb:83:in `initialize_all_templates'
from /home/<my_user_>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/guardfile.rb:39:in `initialize_all_templates'
from /home/<my_user_>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/cli.rb:162:in `init'
from /home/<my_user_>/.gem/ruby/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
from /home/<my_user_>/.gem/ruby/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
from /home/<my_user_>/.gem/ruby/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
from /home/<my_user_>/.gem/ruby/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /home/<my_user_>/.gem/ruby/2.0.0/gems/guard-2.0.3/bin/guard:6:in `<top (required)>'
from /home/<my_user_>/.gem/ruby/2.0.0/bin/guard:23:in `load'
from /home/<my_user_>/.gem/ruby/2.0.0/bin/guard:23:in `<main>'
Looking in the /home/<my_user_>/.gem/ruby/2.0.0/gems/guard-jekyll-plus-1.4.9/lib/guard/
directory I see that there is no jekyllplus/
subdirectory but only jekyll-plus/
. Out of curiosity I renamed a copy of the jekyll-plus/
subdirectory to jekyllplus/
and the bundle exec guard init
works.
Further, when I attempt to run guard I receive the following error.
Configuration file: _config.yml
/home/<my_user>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/notifier.rb:101:in `block in turn_on': undefined method `title' for nil:NilClass (NoMethodError)
from /home/<my_user>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/notifier.rb:99:in `each'
from /home/<my_user>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/notifier.rb:99:in `turn_on'
from /home/<my_user>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/setuper.rb:235:in `_setup_notifier'
from /home/<my_user>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/setuper.rb:66:in `setup'
from /home/<my_user>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/commander.rb:24:in `start'
from /home/<my_user>/.gem/ruby/2.0.0/gems/guard-2.0.3/lib/guard/cli.rb:96:in `start'
from /home/<my_user>/.gem/ruby/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
from /home/<my_user>/.gem/ruby/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
from /home/<my_user>/.gem/ruby/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
from /home/<my_user>/.gem/ruby/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /home/<my_user>/.gem/ruby/2.0.0/gems/guard-2.0.3/bin/guard:6:in `<top (required)>'
from /home/<my_user>/.gem/ruby/2.0.0/bin/guard:23:in `load'
from /home/<my_user>/.gem/ruby/2.0.0/bin/guard:23:in `<main>'
My guard file for jekyll-plus looks like:
guard "jekyll-plus" do
watch %r{.*}
ignore %r{^_site}
end
At first I thought it may be a problem with guard, however it runs fine when I use other guard plugins. Once I include jekyll-plus in the Guardfile I encounter the error. I've included both of the errors I'm seeing in one issue, as I think it may be possible that they are related (bad install?)
Any insight is appreciated.
Basically, by requiring this file here: https://github.com/imathis/guard-jekyll-plus/blob/master/lib/guard/jekyll_plus/templates/Guardfile#L1 , the Guard::JekyllPlus class becomes defined (so Guard doesn't autoload it).
The result is: Guard::JekyllPlus doesn't have the run_* methods, so Guard does nothing when files change.
Some companies will only use gems with a certain license.
The canonical and easy way to check is via the gemspec,
via e.g.
spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']
Even for projects that already specify a license, including a license in your gemspec is a good practice, since
it is easily discoverable there without having to check the readme or for a license file.
For example, there is a License Finder gem
to help companies ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec.
This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.
If you need help choosing a license (sorry, I haven't checked your readme or
looked for a license file), github has created a license picker tool.
In case you're wondering how I found you and why I made this issue, it's because
I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too,
and make issues for gemspecs not specifying a license as a public service :).
I hope you'll consider specifying a license in your gemspec. If not, please just close the issue and let me know.
In either case, I'll follow up. Thanks!
p.s. I've written a blog post about this project
I'm not sure whether to post this issue here or not, since I'm not sure what's the source of this issue. sory if this isn't the place!
I'm unsing guard-jekyll-plus with livereload gem to watch changes instantly when I refresh my browser...
I'm currently on latest version of xubuntu.
When I run "guard" everything works as expected. I can even whatch my site instantly, without using "jekyll serve --watch" command. BUT inmediately after changing a file, the extension goes crazy and starts to reload the webpage everytime.
here's the output of guard
. It literaly fills a lot of screens in very few seconds and ctrl+c is not working...
alumno@alumno-Intel-powered-classmate-PC:~/github/SluggyMaster$ guard
Configuration file: _config.yml
01:26:48 - INFO - Jekyll building...
01:26:50 - INFO - Jekyll build completed in 2.07s /home/alumno/github/SluggyMaster → _site
01:26:50 - INFO - Jekyll watching and serving using jekyll at 127.0.0.1:4000
01:26:50 - INFO - Jekyll watching
01:26:50 - INFO - LiveReload is waiting for a browser to connect.
Configuration file: /home/alumno/github/SluggyMaster/_config.yml
01:26:50 - INFO - Guard is now watching at '/home/alumno/github/SluggyMaster'
[1] guard(main)> Server address: http://127.0.0.1:4000/
Server running... press ctrl-c to stop.
01:27:03 - INFO - Browser connected.
(NOTE: unless I save any file, this will remain here, but when i do, the followin happens:)
01:27:13 - INFO - Jekyll Files changed: building...
|
| ~ _posts/2015-12-27-reference.md
|
01:27:14 - INFO - Jekyll build completed in 0.94s /home/alumno/github/SluggyMaster → _site
01:27:14 - INFO - Reloading browser: _posts/2015-12-27-reference.md
01:27:14 - INFO - Jekyll Files changed: building...
|
| ~ _site/apidocs.html
| ~ _site/feed.xml
| ~ _site/index.html
| ~ _site/jekyll/update/2015/12/27/welcome-to-jekyll.html
| ~ _site/api/reference/2015/12/27/reference.html
|
01:27:16 - INFO - Jekyll build completed in 1.36s /home/alumno/github/SluggyMaster → _site
01:27:16 - INFO - Reloading browser: _site/apidocs.html _site/feed.xml _site/index.html _site/css/main.css _site/jekyll/update/2015/12/27/welcome-to-jekyll.html _site/api/reference/2015/12/27/reference.html
01:27:16 - INFO - Jekyll Files changed: building...
|
| ~ _site/apidocs.html
| ~ _site/feed.xml
| ~ _site/index.html
| ~ _site/jekyll/update/2015/12/27/welcome-to-jekyll.html
| ~ _site/api/reference/2015/12/27/reference.html
|
01:27:17 - INFO - Jekyll build completed in 1.27s /home/alumno/github/SluggyMaster → _site
01:27:17 - INFO - Reloading browser: _site/apidocs.html _site/feed.xml _site/index.html _site/css/main.css _site/jekyll/update/2015/12/27/welcome-to-jekyll.html _site/api/reference/2015/12/27/reference.html
01:27:18 - INFO - Jekyll Files changed: building...
|
| ~ _site/apidocs.html
| ~ _site/feed.xml
| ~ _site/index.html
| ~ _site/jekyll/update/2015/12/27/welcome-to-jekyll.html
| ~ _site/api/reference/2015/12/27/reference.html
|
^C01:27:19 - INFO - Reloading browser: _site/apidocs.html _site/feed.xml _site/index.html _site/css/main.css _site/jekyll/update/2015/12/27/welcome-to-jekyll.html _site/api/reference/2015/12/27/reference.html
[1] guard(main)>
(etc...)
Here's my Guardfile
guard 'jekyll-plus', :serve => true do
watch /.*/
# ignore /^_site/
end
guard 'livereload' do
watch /.*/
end
This seems to be a bit of a strange approach. When I update a file it isn't run through a template, it simply gets copied to the _site folder. This isn't right.
When guard attempts to load the JekyllPlus class there is an error on line 4 of /lib/guard/jekyll-plus.rb
.
Here are the versions I'm using:
guard (2.10.1)
guard-jekyll-plus (1.4.9)
guard-livereload (2.4.0)
Guardfile:
guard 'jekyll-plus', :serve => true do
watch /.*/
ignore /^_site/
end
guard 'livereload' do
watch /.*/
end
Here's a complete backtrace:
perryt-tor-m:chip perryt$ guard
10:36:48 - ERROR - Could not load 'guard/jekyll-plus' or' ' find class Guard::JekyllPlus
10:36:48 - ERROR - Error is: cannot load such file -- guard/guard
10:36:48 - ERROR - /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-jekyll-plus-1.4.9/lib/guard/jekyll-plus.rb:4:in `require'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-jekyll-plus-1.4.9/lib/guard/jekyll-plus.rb:4:in `<top (required)>'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard/plugin_util.rb:105:in `require'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard/plugin_util.rb:105:in `rescue in plugin_class'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard/plugin_util.rb:97:in `plugin_class'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard/plugin_util.rb:56:in `initialize_plugin'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard/internals/plugins.rb:24:in `add'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard/dsl.rb:186:in `block in guard'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard/dsl.rb:183:in `each'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard/dsl.rb:183:in `guard'
> [#] /Users/perryt/projects/chip/Guardfile:1:in `evaluate'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard/dsl.rb:378:in `instance_eval'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard/dsl.rb:378:in `evaluate'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard/guardfile/evaluator.rb:91:in `evaluate'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard.rb:155:in `_evaluate'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard.rb:60:in `setup'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard/commander.rb:32:in `start'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard/cli.rb:243:in `_start'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard/cli.rb:108:in `start'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard/aruba_adapter.rb:32:in `execute'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/lib/guard/aruba_adapter.rb:19:in `execute!'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/gems/guard-2.10.1/bin/guard:11:in `<top (required)>'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/bin/guard:23:in `load'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/bin/guard:23:in `<main>'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
> [#] /Users/perryt/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'
10:36:48 - ERROR - Invalid Guardfile, original error is:
> [#]
> [#] Could not load class: "JekyllPlus",
> [#] backtrace:
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/plugin_util.rb:57:in `initialize_plugin'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/internals/plugins.rb:24:in `add'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/dsl.rb:186:in `block in guard'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/dsl.rb:183:in `each'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/dsl.rb:183:in `guard'
> [#] (dsl)> ./Guardfile:1:in `evaluate'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/dsl.rb:378:in `instance_eval'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/dsl.rb:378:in `evaluate'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/guardfile/evaluator.rb:91:in `evaluate'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard.rb:155:in `_evaluate'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard.rb:60:in `setup'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/commander.rb:32:in `start'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/cli.rb:243:in `_start'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/cli.rb:108:in `start'
> [#] (dsl)> $GEM_PATH[0]/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
> [#] (dsl)> $GEM_PATH[0]/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
> [#] (dsl)> $GEM_PATH[0]/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
> [#] (dsl)> $GEM_PATH[0]/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/aruba_adapter.rb:32:in `execute'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/lib/guard/aruba_adapter.rb:19:in `execute!'
> [#] (dsl)> $GEM_PATH[0]/gems/guard-2.10.1/bin/guard:11:in `<top (required)>'
> [#] (dsl)> $GEM_PATH[0]/bin/guard:23:in `load'
> [#] (dsl)> $GEM_PATH[0]/bin/guard:23:in `<main>'
> [#] (dsl)> $GEM_PATH[0]/bin/ruby_executable_hooks:15:in `eval'
> [#] (dsl)> $GEM_PATH[0]/bin/ruby_executable_hooks:15:in `<main>'
Whenever I attempt to start Guard with the following configuration:
guard 'jekyll-plus', serve: false, future: true, drafts: true, silent: true do
watch(/^src/)
watch('_config.yml')
end
I get the following error:
18:47:07 - ERROR - �mCould not load 'guard/jekyll-plus' or' ' find class Guard::JekyllPlus�
18:47:07 - ERROR - �Error is: cannot load such file -- guard/guard�
18:47:07 - ERROR - �m/home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-jekyll-plus-1.4.9/lib/guard/jekyll-plus.rb:4:in `require'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-jekyll-plus-1.4.9/lib/guard/jekyll-plus.rb:4:in `<top (required)>'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard/plugin_util.rb:105:in `require'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard/plugin_util.rb:105:in `rescue in plugin_class'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard/plugin_util.rb:97:in `plugin_class'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard/plugin_util.rb:56:in `initialize_plugin'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard/internals/plugins.rb:24:in `add'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard/dsl.rb:186:in `block in guard'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard/dsl.rb:183:in `each'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard/dsl.rb:183:in `guard'
> [#] /home/jalcine/Development/Projects/jalcine.me/Guardfile:15:in `evaluate'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard/dsl.rb:378:in `instance_eval'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard/dsl.rb:378:in `evaluate'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard/guardfile/evaluator.rb:91:in `evaluate'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard.rb:155:in `_evaluate'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard.rb:60:in `setup'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard/commander.rb:32:in `start'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard/cli.rb:243:in `_start'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard/cli.rb:108:in `start'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard/aruba_adapter.rb:32:in `execute'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/lib/guard/aruba_adapter.rb:19:in `execute!'
> [#] /home/jalcine/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-2.10.2/bin/guard:11:in `<top (required)>'
> [#] bin/guard:16:in `load'
> [#] bin/guard:16:in `<main>'
Looks like this gem isn't compatible with Guard 2.10.2; might be a duplicate of #29.
Depends on server config used.
Workaround: using Guard groups and running LiveReload from a separate guard instance (e.g. bundle exec guard -g livereload
, given LiveReload has it's own group).
Probable cause: calling fork() messes up the threads in EventMachine in LiveReload
Possible solution/workaround: fixing LiveReload to run itself in a fork, so it's isolated from other fork() calls
does this handle files in the _data dir? jekyll doesn't seem to handle these so well, presumably because it doesn't know which templates depend on which data files. i was hoping for something that would just rebuild everything when a data file changes.
Has anyone been able to get this project working with the jekyll-assets project successfully? Here is what I have been trying so far. Thoughts?
Guardfile
guard 'sass', :input => 'assets/css'
guard "jekyll-plus", :serve => true do
watch /_pages/
watch /_posts/
watch /assets/
ignore /^_site/
end
guard :concat, type: "css", input_dir: "assets/css", output: "application"
Gemfile
source 'https://rubygems.org'
ruby '2.0.0'
# ------------------------------------------------------------------------------------
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# ------------------------------------------------------------------------------------
gem 'jekyll'
gem 's3_website'
gem 'kramdown'
gem 'guard-jekyll-plus'
gem "guard-sass"
gem "guard-concat"
gem 'rake'
# ------------------------------------------------------------------------------------
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# ------------------------------------------------------------------------------------
group :development do
gem 'jekyll-assets'
gem 'sass'
gem 'uglifier'
gem 'sprockets'
end
group :production do
gem 'jekyll-minify-html'
end
Error
00:25:13 - ERROR - Guard::Sass failed to achieve its <run_on_changes>, exception was:
> [#] NoMethodError: undefined method `[]' for nil:NilClass
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sprockets-2.10.1/lib/sprockets/sass_functions.rb:63:in `sprockets_context'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sprockets-2.10.1/lib/sprockets/sass_functions.rb:6:in `asset_path'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/script/funcall.rb:112:in `_perform'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/script/node.rb:40:in `perform'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/script/funcall.rb:99:in `block in _perform'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/script/funcall.rb:99:in `map'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/script/funcall.rb:99:in `_perform'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/script/node.rb:40:in `perform'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:298:in `visit_prop'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `visit'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100:in `visit'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `map'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `visit_children'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:109:in `block in visit_children'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:121:in `with_environment'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:108:in `visit_children'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `block in visit'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:320:in `visit_rule'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `visit'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100:in `visit'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `map'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `visit_children'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:109:in `block in visit_children'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:121:in `with_environment'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:108:in `visit_children'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `block in visit'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:128:in `visit_root'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `visit'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100:in `visit'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:7:in `visit'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/tree/root_node.rb:20:in `render'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/engine.rb:315:in `_render'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/engine.rb:262:in `render'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-sass-1.3.2/lib/guard/sass/runner.rb:87:in `compile'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-sass-1.3.2/lib/guard/sass/runner.rb:51:in `block (2 levels) in compile_files'
> [#] /Users/chrishough/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-sass-1.3.2/lib/guard/sass/runner.rb:50:in `block in compile_files'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-sass-1.3.2/lib/guard/sass/runner.rb:47:in `each'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-sass-1.3.2/lib/guard/sass/runner.rb:47:in `compile_files'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-sass-1.3.2/lib/guard/sass/runner.rb:23:in `run'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-sass-1.3.2/lib/guard/sass.rb:147:in `run_on_changes'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:99:in `block in run_supervised_task'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:97:in `catch'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:97:in `run_supervised_task'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:144:in `block in run_first_task_found'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:142:in `each'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:142:in `run_first_task_found'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:79:in `block in run_on_changes'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:175:in `block (3 levels) in scoped_guards'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:173:in `each'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:173:in `block (2 levels) in scoped_guards'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:172:in `catch'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:172:in `block in scoped_guards'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:170:in `each'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:170:in `scoped_guards'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:72:in `run_on_changes'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard.rb:123:in `block (2 levels) in setup_listener'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard.rb:387:in `block in within_preserved_state'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard.rb:384:in `synchronize'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard.rb:384:in `within_preserved_state'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard.rb:122:in `block in setup_listener'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/listen-1.3.1/lib/listen/listener.rb:252:in `call'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/listen-1.3.1/lib/listen/listener.rb:252:in `on_change'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/listen-1.3.1/lib/listen/listener.rb:290:in `block in initialize_adapter'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/listen-1.3.1/lib/listen/adapter.rb:252:in `call'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/listen-1.3.1/lib/listen/adapter.rb:252:in `report_changes'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/listen-1.3.1/lib/listen/adapter.rb:321:in `poll_changed_directories'
> [#] /Users/chrishough/Huedio/Code/Editorial/.bundle/ruby/2.0.0/gems/listen-1.3.1/lib/listen/adapter.rb:297:in `block in start_poller'
It seems the plugin is almost compatible with jekyll 3 but the baseurl is not passed to serve somehow, while it was working with jekyll 2. So if I have a baseurl in my config.yml then its not used to serve the index file. any idea?
I'm deploying my site to Github Pages, as part of this I need to be able to use the --baseurl '' option when I start the server locally. I can't figure out a way to pass this parameter to the server via Guard. I would much prefer not to have to set it and change it constantly in _config.yml, as it has to be set to a specific value for GitHub deployment.
Is there anyway to pass this parameter to the server?
Ian
I just update from version 2.0.0 to 2.0.1 and it started giving me the error above. Below is the full error dump:
17:22:21 - INFO - Reloading browser: gnu_manual.html
17:22:54 - INFO - Jekyll updating files
|
17:22:54 - ERROR - Guard::JekyllPlus failed to achieve its <run_on_modifications>, exception was:
> [#] ArgumentError: same file: js/gnu_manual_script.js and js/gnu_manual_script.js
> [#] /Users/elmer/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:1569:in `block in fu_each_src_dest'
> [#] /Users/elmer/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:1586:in `fu_each_src_dest0'
> [#] /Users/elmer/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:1568:in `fu_each_src_dest'
> [#] /Users/elmer/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:401:in `cp'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-jekyll-plus-2.0.1/lib/guard/jekyll_plus/builder/action.rb:97:in `copy'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-jekyll-plus-2.0.1/lib/guard/jekyll_plus/builder/modifier.rb:18:in `block in do_update'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-jekyll-plus-2.0.1/lib/guard/jekyll_plus/builder/modifier.rb:18:in `each'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-jekyll-plus-2.0.1/lib/guard/jekyll_plus/builder/modifier.rb:18:in `do_update'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-jekyll-plus-2.0.1/lib/guard/jekyll_plus/builder/action.rb:82:in `update'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-jekyll-plus-2.0.1/lib/guard/jekyll_plus/builder.rb:38:in `modified'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-jekyll-plus-2.0.1/lib/guard/jekyll_plus.rb:43:in `run_on_modifications'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/runner.rb:82:in `block in _supervise'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/runner.rb:79:in `catch'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/runner.rb:79:in `_supervise'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/runner.rb:61:in `block (3 levels) in run_on_changes'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/runner.rb:56:in `each'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/runner.rb:56:in `block (2 levels) in run_on_changes'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/runner.rb:119:in `block (2 levels) in _run_group_plugins'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/runner.rb:117:in `each'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/runner.rb:117:in `block in _run_group_plugins'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/runner.rb:116:in `catch'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/runner.rb:116:in `_run_group_plugins'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/runner.rb:54:in `block in run_on_changes'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/runner.rb:53:in `each'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/runner.rb:53:in `run_on_changes'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/internals/queue.rb:23:in `process'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/commander.rb:43:in `start'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/cli/environments/valid.rb:16:in `start_guard'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/cli.rb:113:in `start'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/aruba_adapter.rb:32:in `execute'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/lib/guard/aruba_adapter.rb:19:in `execute!'
> [#] /Users/elmer/.rvm/gems/ruby-2.2.1/gems/guard-2.12.5/bin/_guard-core:11:in `<main>'
17:22:55 - INFO - Guard::JekyllPlus has just been fired
17:22:55 - INFO - Reloading browser: js/gnu_manual_script.js
I have teste the following:
guard 'jekyll-plus', {:serve => true} do
to guard 'jekyll_plus', {:serve => true} do
It seems like folders whose names start with an underscore don't get automatically ignored.
expected: guard/jekyll_plus{.rb,/**{
and module Guard::JekyllPlus
actual: guard/jekyll-plus{.rb,/**}
and module Guard::Jekyllplus
acceptable alternative: guard/jekyllplus{.rb,/**}
and module Guard::Jekyllplus
Problem: mostly with the template (guard init
), although both Guard and plugins should adopt a single convention (and deprecate everything else).
Reference: http://guides.rubygems.org/name-your-gem/
It's up to you to decide whether you want to change the module name or the file names - if you make the changes and commit to master, I'll make sure they work in Guard.
I decided for this small project I'd use this newfangled Guardfile of yours! Unfortunately the init process seems to have some naming issue. I think the solution is just to rename the file to jekyll-plus.rb
inside lib/guard
. Have you seen this?
~/code/bookmarks.parkermoore.de$ be guard init jekyll-plus
17:55:26 - ERROR - Could not load 'guard/jekyll-plus' or '~/.guard/templates/jekyll-plus' or find class Guard::Jekyllplus
~/code/bookmarks.parkermoore.de$ be guard init jekyllplus
/Users/parker/.rbenv/versions/1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:296:in `to_specs': Could not find 'guard-jekyllplus' (>= 0) among 30 total gem(s) (Gem::LoadError)
Using guard (1.8.1)
Installing guard-jekyll-plus (1.2.3)
Hi,
I came across your plugin by this guy:
https://github.com/neverstopbuilding/blog
He wrote an article on how to integrate jekyll with slim and compass and guard:
http://www.neverstopbuilding.com/jekyll-slim-compass-blog
However, in my install 'bundle exec guard' never gets passed loading the _config.yml and then just hangs there. No cpu use.
I checked out the blog above and tried it there, same thing. So I am guessing it is a thing at maybe your end. Since there is no cpu use I am thinking it is waiting for something.
Tried on ruby 2.0, 2.1 ubuntu 12.04 13.10 and arch linux.
gr.
S
Guard now expects to find the Guardfile template in lib/jekyllplus/templates/Guardfile instead of lib/jekyll-plus/templates/Guardfile. Also there are other issues related to notifications.
C:\Users\pauloandrade\Documents\projetos\prba>guard
Configuration file: _config.yml
11:27:46 - INFO - Jekyll building...
11:27:48 - INFO - Jekyll build completed in 1.72s C:/Users/pauloandrade/Document
s/projetos/prba  _site
11:27:48 - ERROR - Guard::JekyllPlus failed to achieve its , exception wa
s:
[#145D4DF2C363] NotImplementedError: fork() function is unimplemented on this
'
machine
[#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-jekyll-plus-2.0.2/l
ib/guard/jekyll_plus/server.rb:68:infork' [#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-jekyll-plus-2.0.2/l ib/guard/jekyll_plus/server.rb:68:in
start_jekyll'
[#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-jekyll-plus-2.0.2/l
ib/guard/jekyll_plus/server.rb:18:instart' [#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-jekyll-plus-2.0.2/l ib/guard/jekyll_plus.rb:25:in
start'
[#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/ru
nner.rb:82:inblock in _supervise' [#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/ru nner.rb:79:in
catch'
[#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/ru
nner.rb:79:in_supervise' [#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/ru nner.rb:22:in
block (3 levels) in run'
[#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/ru
nner.rb:119:inblock (2 levels) in _run_group_plugins' [#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/ru nner.rb:117:in
each'
[#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/ru
nner.rb:117:inblock in _run_group_plugins' [#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/ru nner.rb:116:in
catch'
[#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/ru
nner.rb:116:in_run_group_plugins' [#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/ru nner.rb:21:in
block (2 levels) in run'
[#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/ru
nner.rb:20:ineach' [#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/ru nner.rb:20:in
block in run'
[#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/lumberjack-1.0.9/lib/lumb
erjack.rb:32:inunit_of_work' [#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/ru nner.rb:18:in
run'
[#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/co
mmander.rb:34:instart' [#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/cl i/environments/valid.rb:16:in
start_guard'
[#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/cl
i.rb:122:instart' [#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/comm and.rb:27:in
run'
[#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/invo
cation.rb:126:ininvoke_command' [#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:3 59:in
dispatch'
[#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/base
.rb:440:instart' [#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/ar uba_adapter.rb:32:in
execute'
[#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/lib/guard/ar
uba_adapter.rb:19:inexecute!' [#145D4DF2C363] C:/App/Ruby/lib/ruby/gems/2.0.0/gems/guard-2.12.6/bin/_guard-c ore:11:in
11:27:48 - INFO - Guard::JekyllPlus has just been fired
11:27:48 - INFO - Guard is now watching at 'C:/Users/pauloandrade/Documents/proj
etos/prba'
[1] guard(main)> ]
How I do solve this?
Config overwriting appears to have been broken by this commit to Jekyll (tested 3.0.5): jekyll/jekyll@d01f794
Specifically, it seems that the override = Configuration[override].stringify_keys
line was removed.
In Jekyll config files you can define an array of files and directories to exclude from the build (ie. after the build they will not be copied to the _site directory). However, when guard is running and one of the files in the Jekyll exclude array is modified that file is still copied into the _site (or whatever) directory.
I would expect nothing (no copying) to happen if I modify a file that is part of the Jekyll exclude settings while running guard.
I have a plugin (a mondified version of https://github.com/slashdotdash/jekyll-lunr-js-search) that generates a search.json file for indexing. By default the plugin writes this file to the _site folder, but modified the extension to copy it to the root folder so that it would get pushed up to GitHub to be served by GitHub Pages.
Of course, the moment I copy it to the root folder it triggers another build and this loops indefinitely. My hope was that guard-jekyll-plus would be the solution, but sadly it seems that the plugin gets run on first startup, but not when I change a watched file (I do see the file getting processed and updated).
Is there anyway to make the plugin run on update?
Thanks,
Ian
When I run guard init jekyll
I get:
/Users/kaishin/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'guard-jekyll' (>= 0) among 142 total gem(s) (Gem::LoadError)
I'm also enable to get the plugin to work.
Am I missing something here?
I'm not a rubyist, but I'm trying to use Jekyll and guard for blogging. I see the following error when I try to install your gem:
Bundler could not find compatible versions for gem "jekyll":
In Gemfile:
guard-jekyll-plus (>= 0) ruby depends on
jekyll (>= 1.0.0) ruby
jekyll-asset-pipeline (>= 0) ruby depends on
jekyll (0.12.1)
In my Gemfile:
gem 'jekyll'
gem 'jekyll-asset-pipeline'
group :development do
gem 'guard-jekyll-plus', git: 'https://github.com/imathis/guard-jekyll-plus', branch: 'master'
gem 'rb-fsevent'
gem 'guard-livereload'
end
To me, it looks like you relaxed the version of Jekyll needed in your Master branch, but maybe I'm confused.... Maybe the problem is jekyll-asset-pipeline...
Not sure if this is normal or not, but here is a little something I had issues with.
My setup involves a main folder with a Gemfile
and guardfile
, and the Jekyll source itself is one folder below, under src
(including src/_config.yml
).
To make this work with guard-jekyll-plus
, I had to provide this:
guard 'jekyll-plus', serve: true, source: 'src', config: ['src/_config.yml'] do
# SNIP
end
Specifying only the config
key wouldn't work and leads to issues with layouts not found at build time. Giving only source
did not seem to work either.
I'm not sure if I handled this incorrectly, but if I did, maybe this is worth documenting somewhere to save time to others?
Thanks for your otherwise great extension :-)
Really small thing but it'd be good to mention adding the Guardfile
to the list of excluded files in the _config.yml
:
exclude: ['Gemfile', 'Gemfile.lock', 'Guardfile']
I wasn't sure how best to word it or I'd have done a PR.
I've found that if I configure Jekyll-plus to serve drafts, that those drafts are copied to _site with no layout causing only the contents of the draft file itself to be rendered out. Adding the correct layout into the drafts front matter resolves the issue but this is different behaviour to that of Jekyll itself.
@e2 It looks like these changes didn't work for Guard. Here's what I'm finding with the latest release of this plugin.
$ guard init jekyll_plus
23:33:43 - INFO - Writing new Guardfile to /Users/imathis/workspace/test/Guardfile
23:33:43 - ERROR - Could not find 'guard-jekyll_plus' gem path.
23:33:43 - ERROR - Could not load 'guard/jekyll_plus' or '~/.guard/templates/jekyll_plus' or find class Guard::Jekyll_plus
And of course:
$ guard init jekyll-plus
23:33:48 - ERROR - Could not load 'guard/jekyll-plus' or '~/.guard/templates/jekyll-plus' or find class Guard::Jekyllplus
I noticed that the tests do not test the command line usage, but rather interact directly with the Ruby class. I do not like mixing underscores and dashes, I'd really rather not rename the gem. Do you have a suggestion for how I can fix this?
no matter what I seem to try, I can not get my site build time to improve. I found a post that rec'd this plugin but it is still seems to process a full rebuild each save.
guard "jekyll-plus", :serve => true do
watch /_includes/
watch /_pages/
watch /_posts/
watch /assets/
ignore /^_site/
end
thoughts?
This is my current watchfile:
guard "jekyll-plus",
:config => ['config/application.yml','config/development.yml'],
:extensions => ['slim','md','html','scss','js','css','jpg','png','rb','txt','yml'],
:serve => true do
watch /_pages/
watch /_posts/
watch /_includes/V1/
watch /_includes/V2/
watch /_assets/V1/
watch /_assets/V2/
watch /index.html/
ignore /^_site/
end
Error message:
=> Turn up Guard to Work on the Site
/.bundle/ruby/2.0.0/gems/guard-1.8.3/lib/guard/dsl.rb:119:in `instance_eval': /Guardfile:8: unknown regexp option - V (SyntaxError)
/Guardfile:8: syntax error, unexpected tINTEGER, expecting keyword_end
watch /_includes/V1/
Thoughts?
Hi,
I believe there is a scoping issue with the rack detection code. At the top of jekyll-plus.rb there is the following:
begin
require 'rack'
@use_rack = true
rescue LoadError
end
The @use_rack
variable is then used later within the Jekyllplus class. However, I believe that when @use_rack
is dereferenced, Ruby is looking within the Jekyllplus instance and @use_rack
is undefined within the instance. When experimenting I was able to see that @use_rack
was set to true within the begin
block but evaluated to false within the Jekyllplus class.
I have a PR that I will submit.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.