Lately, I’ve been getting page build failures for my Jekyll site hosted on GitHub Pages:
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:
bundle update
Then build your site:
bundle exec jekyll build --safe
Now when I push my latest commit to my repository, my site builds successfully: