Diamonds are a Chap’s Best Friend
Richard Mortier · 2 min read · April 09, 2015 · #techAs noted previously, this site is basically a Github-hosted Jekyll site at present, though one that can be built as a Mirage unikernel. Part of the Mirage workflow to publish a new post involves using Travis CI to build and then commit back a new unikernel image. Thus it is currently necessary to run Jekyll in the Travis build scripts, and the dynamism of the Ruby environment meant that this broke (again) recently as one of the github-pages
gem’s dependencies now depends on Ruby >= 2.0
while the default Rubies on the Travis Ubuntu image for C
language builds is 1.8
(via Ubuntu packaging) or, if you remove that one, 1.9
(via rvm). Read on to find out how to fix this…
The fix that currently works for me turns out to be relatively simple: remove all the rubies installed as Ubuntu packages, and then invoke rvm to set the default ruby to something reasonable – in this case, 2.1.
## remove old ubuntu rubies
## use rvm and a modern-ish ruby
## check that all worked...
## install jekyll and github-pages
And that’s all there is to it – you should now be able to call jekyll
in your Travis environment as you’d expect…