Run Jekyll on Windows

Julian Thilo created an excellent website on how to run Jekyll on Windows. I choose to install everything using Chocolatey and that requires some extra configuration. Every command was executed using an elevated command prompt.

Installing Ruby and Ruby DevKit

choco install ruby
choco install ruby2.devkit

After everything has been installed you might have noticed the installation of ruby2.devkit logged a warning message. It failed to find the Ruby installation folder which means we have to add it manually to the devkit’s config.yml file.

On my machine - and at the time of writing - Ruby has been installed in C:\ruby213. Open the config.yml file in the C:\DevKit2 folder and add the path to the Ruby install folder. Don’t forget the - sign.

# This configuration file contains the absolute path locations of all
# installed Rubies to be enhanced to work with the DevKit. This config
# file is generated by the 'ruby dk.rb init' step and may be modified
# before running the 'ruby dk.rb install' step. To include any installed
# Rubies that were not automagically discovered, simply add a line below
# the triple hyphens with the absolute path to the Ruby root directory.
# Example:
# ---
# - C:/ruby19trunk
# - C:/ruby192dev
- C:/ruby213

Next, navigate to the devkit’s installation folder and re-run the installation command:

ruby dk.rb install

After the development kit has been initialized and installed, add the C:\DevKit2\mingw\bin to your system’s PATH.

Installing Python

choco install python2
choco install pip

After Python and Pip have been installed, we can install the Pygments syntax highlighter using the following command:

python -m pip install Pygments

I don’t know the reason behind this, but it seems that Jekyll is looking for a binary called python2. Navigate to the Python installation folder and create a symbolic link.

mklink python2.exe python.exe

Install Jekyll

The last thing to do is to install Jekyll itself:

gem install jekyll
comments powered by Disqus