Jekyll on Windows

While Windows is not an officially-supported platform, it can be used to run Jekyll with the proper tweaks. This page aims to collect some of the general knowledge and lessons that have been unearthed by Windows users.


A quick way to install Jekyll is to follow the installation instructions by David Burela:

  1. Install a package manager for Windows called Chocolatey
  2. Install Ruby via Chocolatey: choco install ruby -y
  3. Reopen a command prompt and install Jekyll: gem install jekyll

For a more conventional way of installing Jekyll you can follow the installation instruction by Julian Thilo. The instructions were written for Ruby 2.0.0, but should work for later versions prior to 2.2.


If you use UTF-8 encoding, make sure that no BOM header characters exist in your files or very, very bad things will happen to Jekyll. This is especially relevant if you’re running Jekyll on Windows.

Additionally, you might need to change the code page of the console window to UTF-8 in case you get a “Liquid Exception: Incompatible character encoding” error during the site generation process. It can be done with the following command:

$ chcp 65001


As of v1.3.0, Jekyll uses the listen gem to watch for changes when the --watch switch is specified during a build or serve. While listen has built-in support for UNIX systems, it requires an extra gem for compatibility with Windows. Add the following to the Gemfile for your site:

gem 'wdm', '~> 0.1.0' if Gem.win_platform?

How to install github-pages

This section is part of an article written by Jens Willmer. To follow the instructions you need to have Chocolatey installed on your system. If you already have a version of Ruby installed you need to uninstall it before you can continue.

Install Ruby and Ruby development kit

Open a command prompt and execute the following commands:

  • choco install ruby -version 2.2.4
  • choco install ruby2.devkit - needed for compilation of json gem

Configure Ruby development kit

The development kit did not set the environment path for Ruby so we need to do it.

  • Open command prompt in C:\tools\DevKit2
  • Execute ruby dk.rb init to create a file called config.yml
  • Edit the config.yml file and include the path to Ruby - C:/tools/ruby22
  • Execute the following command to set the path: ruby dk.rb install

Nokogiri gem installation

This gem is also needed in the github-pages and to get it running on Windows x64 we have to install a few things.

Note: In the current pre release it works out of the box with Windows x64 but this version is not referenced in the github-pages.

choco install libxml2 -Source ""

choco install libxslt -Source ""

choco install libiconv -Source ""

 gem install nokogiri --^

Install github-pages

  • Open command prompt and install Bundler: gem install bundler
  • Create a file called Gemfile without any extension in your root directory of your blog
  • Copy & paste the two lines into the file:
source ''
gem 'github-pages'
  • Note: We use an unsecure connection because SSL throws exceptions in the version of Ruby
  • Open a command prompt, target your local blog repository root, and install github-pages: bundle install

After this process you should have github-pages installed on your system and you can host your blog again with jekyll s.
There will be a warning on startup that you should include gem 'wdm', '>= 0.1.0' if Gem.win_platform? to your Gemfile but I could not get jekyll s working if I include that line so for the moment I ignore that warning.

In the future the installation process of the github-pages should be as simple as the setup of the blog. But as long as the new version of the Nokogiri (v1.6.8) is not stable and referenced, it is work to get it up and running on Windows.