Paging Dr Jekyll...

11 Oct 2019

My magic site automation… It broke. :(

A while ago I wrote a blog post about how I was deploying to this blog via a Linux powered pipeline.

Well, I tried pushing an updated post the other day… and the automation failed… and I feel like I spent longer debugging the issue than I did writing the post I wanted to deploy…

history

Back in the day running Linux was all about dependency hell. You wanted to install a package, and it required another package, and at some point the package version would be wrong, or incompatible, or broken… and eventually you’d run away screaming back to the safety of macOS or Windows where things just work…

Turns out running a hosted Linux box somewhere else can be too.

fail

So I finally completed a post pushed my code… and nothing…

Time to hit Azure to look at the logs.

Jekyll didn’t install

A Jekyll dependency needed a newer version of Ruby.

No problem - we’ll just install a newer version of Ruby. Which wasn’t that easy, as we needed to add a new package repo, thus:

	sudo apt-add-repository ppa:brightbox/ruby-ng
	sudo apt-get update

and then install Ruby2.4

	sudo apt-get install ruby2.4 ruby2.4-devcode

Done right?

Nope - this time Jekyll didn’t install as I needed to update my Ruby Gems

	sudo gem update --system		

So now we’re done, right?

Nope. Now we have the right Ruby installed, and all the dependencies installed, it turns out the Jekyll theme I’d chosen flex was using an older Markdown parser called redcarpet which (unbeknownst to me) had been deprecated in the most recent version of Jekyll…

At least the fix was easy. My site _config.yml had a line specifying redcarpet as a markdown parser. Removing that line means Jekyll will use the new default parser kramdown

And after all that?

It works!

What a massive faff!

After all that, this post had better deploy properly!

Published on 11 Oct 2019 Find me on Twitter!