Steps to install the latest version of the Jekyll static site/blog generator on Ubuntu on Windows

Jekyll on Ubuntu (+ ruby 2.3) on Windows

Steps

Step 0: Add the brightbox repository

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

Step 1: Install ruby 2.3 and -dev package

sudo apt-get install ruby2.3 ruby2.3-dev

Verify the install by running ruby -v
You should get something similar to

ruby 2.3.1p112 (2016-04-26 revision 54768) 

Step 2: update ruby gems

sudo gem update --system

Step 3: install build-essential

sudo apt-get install build-essential --no-install-recommends

Step 4: install jekyll itself

sudo gem install jekyll

Verify the install by running jekyll -v
You should get something similar to

jekyll 3.1.6

Bonus steps

If you’re using pagination:

sudo gem install jekyll-paginate

To save yourself some typing add the following to your .bashrc

alias jek='jekyll serve --force_polling --incremental'

That’s all - happy blogging!

Anti-steps

Don’t apt-get install jekyll - it’s version 0.11.2 from 2011, while the latest gem is 3.1.6 as of May 2016.

Don’t apt-get install ruby - it’s version 1.9 and Jekyll 3 requires ruby >= 2.0.

Don’t run jekyll with –watch - inotify is not (yet) working properly. Vote for its support here.

Credits

https://www.brightbox.com/blog/2016/01/06/ruby-2-3-ubuntu-packages/

https://talk.jekyllrb.com/t/error-failed-to-build-gem-native-extension/997

https://github.com/Microsoft/BashOnWindows/issues/433

Jordan Biserkov About Blog GitHub Links Projects

04 June 2016


Jordan@Biserkov.com     +359 88 60 222 93 UTC+2     @jbiserkov