2
votes

Out of the blue recently, I started receiving notifications that my Jekyll builds were failing on GitHub Pages:

Page build failed. For more information, see https://help.github.com/articles/troubleshooting-github-pages-builds/.

Besides that, there was no info given, and the site built fine on my local machine. I tried everything I could think of: I built the site locally (worked fine on my machine), I deleted the last few files that had been added (no improvement), and I reset the master branch to exactly as it was when I last had a successful build. I figured for sure the last tactic would work, but I kept getting build failures.

I eventually figured out the answer, which I'm going to write in a moment.

1

1 Answers

3
votes

It turned out the problem was that GitHub upgraded their version of Jekyll. I had to come to the solution by two steps:

  1. Upgrade the github-pages gem on my own computer:
    $ bundle update github-pages
  2. Discover an interesting new error message:
    Liquid Exception: undefined method `gsub' for 1000:Fixnum in /_layouts/post.html

After some fiddling around (and using Jekyll's --verbose option to find where the build was choking), I discovered that this gsub error was caused by a post I had, which was titled "1,000". (It was about a sleepless night, where I tried to count my way to sleep, and gave up after 1,000.) Some updated parser was trying to parse this as a number, apparently. To fix it I changed

title: 1,000

to

title: "1,000"

And voilĂ , GitHub Pages was satisfied.