Search code examples
bundlerjekyllguardlivereload

error using jekyll with guard


I am trying to use jekyll with livereload like explained here:

The project is using Bundler with the github-pages gem (jekyll v.2.4), so guard-jekylland guard-livereload are added to the Gemfile and then I make bundle install and guard init. this is throwing an error starting with:

ERROR - Could not load 'guard/jekyll' or find class Guard::Jekyll

bundle exec guard init is doing the same error.

EDIT: the problem is the same as described here (3rd step)


Solution

  • guard-jekyll is outdated (it might be updated, but I'm not the author, so I don't have access to releasing it - though that may change).

    Either way, I recommend using guard-jekyll-plus, since it does everything guard-jekyll does (which only runs the build) plus more (runs a server automatically, handles handles more file types, and copies static assets).

    Although, there may be a pending update to guard-jekyll-plus soon. (Watch the repository for updates: https://github.com/imathis/guard-jekyll-plus).

    Also, if you use the default template in any of those projects (by running bundle exec guard init), you may want the latest version (2.10.3) of Guard (fixes for ignore rules).