Installing Jekyll on Mac, Ubuntu and Bash on Windows

I’ve had the ‘pleasure’ of having to install Jekyll on different platforms and thought I’d share the findings.


This is the easy one. Install HomeBrew and run:

brew install jekyll

Grab a cup of coffee, you’re done!

On Ubuntu and Bash on Windows

Sadly, this one takes a bit more work. Do not run sudo apt-get install jekyll, because it installs an ANCIENT Jekyll (0.11.2), so the first step is to remove that if you’ve got it installed (sudo apt-get remove jekyll).

There’s multiple ways to install, but the easiest I’ve found is adding a custom repository from Brightbox.

sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby2.2 ruby2.2-dev
sudo gem install iconv posix-spawn mini_magick jekyll

The last step installs necessary gems for Jekyll, although gem ‘mini_magick’ is not strictly necessary.

On Windows you may need to close your terminal and reopen it to update your PATH)

Running Jekyll on Bash on Windows

Filewatchers aren’t working on Bash on Windows yet (in august at least). So if you run in Bash on Windows, you may need to run instead:

jekyll serve --force_polling

This will make sure the HTML/CSS will update when changes are made.

SUDO not working?

Now, on Windows the sudo command may be borked. If you get the error “unable to resolve host NAME”, you’ll need to update your Linux hosts file (which is different from the Windows one). Here’s a guide. Basically, add the host name from /etc/hostname to the file /etc/hosts.