Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (36 sloc) 1.92 KB
layout title date excerpt categories
post
Jekyll build failure
2016-12-04 22:36:00 -4000
Jekyll build failure caused by Bundler installing different gem versions.
github jekyll bundler gem ruby

Lately, I've been getting page build failures for my Jekyll [site]({{ site.url }}) hosted on GitHub Pages:

![Page Build Failure]({{ "/images/2016/12-04-page-build-failure.png" | prepend: site.assets_path }})

But what's frustrating is that it doesn't say what went wrong—plus, my local site has no build issues.

So I started looking for differences. I have Jekyll installed via Bundler so my Gemfile looks like this:

source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins

I update the gems and check the versions:

$ bundle update
$ bundle exec github-pages --version
github-pages 39
$ bundle exec jekyll --version
jekyll 2.4.0

But wait, the GitHub Pages dependency versions are much different than what I have installed locally. What's going on?

It turns out that there's a Bundler issue that causes an older version of the gem to be installed if the version is unspecified.

So the current fix is to specify the version in Gemfile until Bundler resolves the issue:

gem 'github-pages', '104', group: :jekyll_plugins

Update your gems and then build your site:

$ bundle update
$ bundle exec jekyll build --safe

Now when I push my latest commit to my [repository]({{ site.repository | prepend: "https://github.com/" }}), my site builds successfully:

![Page Build Success]({{ "/images/2016/12-04-page-build-success.png" | prepend: site.assets_path }})