来自http://www.madhur.co.in/blog/2011/09/01/runningjekyllwindows.html
Jekyll can also be made to run on Windows Operating System. This prefer when I am working on my office laptop which has Windows 7 installed on it.
Following packages are required to setup Jekyll on Windows:
1 Install the Ruby from http://rubyinstaller.org/downloads/ and install it to path such as C:\ruby
2 Install the Ruby development kit from here and extract it to path such as c:\devkit. Run the following commands
ruby dk.rb init
to generate the config.yml file to be used later in this Step
3 Edit the generated config.yml file to include installed Rubies. For example, in our case, it will look like this
# 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:/ruby
4 Run the following command to install to DevKit enhance your installed Rubies. This step installs (or updates) an operating_system.rb file into the relevant directory needed to implement a RubyGems
ruby dk.rb install
5 Install Jekyll using following command
gem install jekyll
6 Now, you can start using Jekyll. If you require code highlighting using pygments as well, follow the additional steps as well. Install Portable Python from here
7 Now we need to install, easy_install. For python versions > 3, this can be installed fromhttp://pypi.python.org/pypi/distribute Download distribute_setup.py and run the following command in python
python distribute_setup.py
8 Now to install pygments, simply run this command:
easy_install Pygments
9 Note that if you are using Python > 3 as discussed in this blog, you are likely to hit the following error when running Pygmentize
Liquid error: Bad file descriptor
TypeError: Can't convert 'bytes' object to str implicitly
These are known issues and the resolution has been discussed here: https://github.com/rtomayko/posix-spawn/issues/17
This requires a change in C:\ruby\lib\ruby\gems\1.9.1\gems\albino-1.3.3\lib\albino.rb file.
I have created the gist of the changes required here