- Install Ruby
- Install DevKit
- Install Jekyll
- Install Pygments
- Start Jekyll
In "RubyInstallers" section, click a version to download.
Ruby 2.0.0-p598 (x64)is the Windows installer for Ruby 2.0.0 x64 on 64-bit machines.
Install through the installer
- Keep the default directory
C:\Ruby200-x64if possible, please note installer advises that "Please avoid any folder name that contains spaces (e.g. Program Files)."
- Tick "Add Ruby executables to your PATH" checkbox, so PATH will be updated automatically to avoid headaches.
- Keep the default directory
Open up a command prompt window and type in the following command, to see if Ruby has been install correctly or not.
ruby 2.0.0p598 (2014-11-13) [x64-mingw32]
The DevKit is a toolkit that makes it easy to build and use native C/C++ extensions such as RDiscount and RedCloth for Ruby on Windows. Detailed installation instructions can be found on its wiki page.
Go to http://rubyinstaller.org/downloads/ again.
Download "DEVELOPMENT KIT" installer that matches the Windows architecture and the Ruby version just installed. For instance,
DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exeis for 64-bit Windows with Ruby 2.0.0 x64.
Here is a list about how to choose the correct DevKit version:
Ruby 1.8.6 to 1.9.3: DevKit tdm-32-4.5.2
Ruby 2.0.0: DevKit mingw64-32-4.7.2
Ruby 2.0.0 x64: DevKit mingw64-64-4.7.2
Run the installer and extract it to a folder, e.g.
Initialize and create
config.ymlfile. Type in the following commands in command Prompt window:
ruby dk.rb init
In opened notepad window, add a new line
- C:\Ruby200-x64at the end if it's not already there, save and close.
Back to the Command Prompt, review (optional) and install.
ruby dk.rb review
ruby dk.rb install
Verify that gem has been installed properly
Install Jekyll gem
gem install jekyll
The default syntax highlighting engine in Jekyll is Pygments. It requires Python to be installed and
highlighter field to be set to
pygments in site’s configuration file
Recently, Jekyll has added another highlighting engine called Rouge, which doesn't support as many languages as Pygments at the moment, but it's Ruby native and Python-free. More details can be followed here.
- Go to http://www.python.org/download/
- Download appropriate version of Python windows installer, e.g.
Python 2.7.8 Windows Installer. Note that Python 2 is preferred since Python 3 might not be functioning as intended at the time of writing.
- Set the installation directory (e.g.
C:\Python27) to PATH. (How to? See Troubleshooting #1)
Verify Python installation
Install 'Easy Install'
- Visit https://pypi.python.org/pypi/setuptools#installation-instructions for detailed installation instructions.
- For best results, uninstall previous versions FIRST (see Uninstalling).
For machines with PowerShell 3 installed, start up Powershell as administrator and paste this command:
(Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | python -
For Windows without PowerShell 3, download ez_setup.py and save it, for example, to
C:\. Then run it using Python in a command prompt window:
- Add 'Python Scripts' directory (e.g.
C:\Python27\Scripts) to PATH.
Verify easy_install is installed properly
Install Pygments using "easy_install"
jekyll new myblog
“python” is not recognized as an internal or external command, operable program or batch file.
Alternatives: "python" here can also be "ruby", "gem" or "easy_install", etc.
Reason: Program is not properly installed, or the PATH has not been set correctly.
Solution: Ensure the program has been installed correctly. Then add it to the PATH manually, see the steps below.
- Hold Win and press Pause.
- Click Advanced System Settings.
- Click Environment Variables.
;C:\python27to the Path variable.
- Restart Command Prompt.
ERROR: Error installing jekyll: ERROR: Failed to build gem native extension. "C:/Program Files/Ruby/Ruby200-x64/bin/ruby.exe" extconf.rb creating Makefile make generating stemmer-x64-mingw32.def compiling porter.c ... make install /usr/bin/install -c -m 0755 stemmer.so C:/Program Files/Ruby/Ruby200-x64/lib/ruby/gems/2.0.0/gems/fast-stemmer-1.0.2/li /usr/bin/install: target `Files/Ruby/Ruby200-x64/lib/ruby/gems/2.0.0/gems/fast-stemmer-1.0.2/lib' is not a directory make: *** [install-so] Error 1
Reason: Ruby has been installed to a folder with spaces.
Solution: Re-install Ruby, but this time install it to a folder without spaces, or simply keep the default directory when installing.
Generating... Liquid Exception: No such file or directory - python c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/pygments.rb-0.4.2/lib/pygments/mentos.py in 2013-04-22-yizeng-hello-world.md
Reason: Pygments is not properly installed or the PATH is yet to be effective.
Solution: First make sure Pygments has been installed and PATH for Python is correct without no spaces or trailing slash. Then restart Command Prompt. If it's not working, try logout Windows and log back in again. Or even try the ultimate and most powerful solution - "turning the computer off and on again".
Generating... Liquid Exception: No such file or directory - /bin/sh in _posts/2013-04-22-yizeng-hello-world.md
Reason: Incompatibility issue with pygments.rb versions 0.5.1/0.5.2.
Solution: Downgrade pygments.rb gem from 0.5.1/0.5.2 to version 0.5.0.
gem uninstall pygments.rb --version 0.5.2
gem install pygments.rb --version 0.5.0
c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'pygments.rb' (~> 0.4.2) - did find: [pygments.rb-0.5.0] (Gem::LoadError) from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/specification.rb:1196:in `block in activate_dependencies' from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/specification.rb:1185:in `each' from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/specification.rb:1185:in `activate_dependencies' from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/specification.rb:1167:in `activate' from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:48:in`gem' from c:/Ruby200-x64/bin/jekyll:22:in `<main>'`
Reason: As suggested in the message, pygments.rb 0.4.2 is needed, while version 0.5.0 is found. (This issue happened a while back with an old version of Jekyll, which should have been fixed by now.)
Solution: Downgrade pygments.rb gem to version 0.4.2
gem uninstall pygments.rb --version 0.5.0
gem install pygments.rb --version 0.4.2
Generating... You are missing a library required for Markdown. Please run: $ [sudo] gem install rdiscount Conversion error: There was an error converting '_posts/2013-04-22-yizeng-hello-world.md/#excerpt'. ERROR: YOUR SITE COULD NOT BE BUILT: ------------------------------------ Missing dependency: rdiscount
rdiscountis missing. This is most likely because the site selects rdiscount as Markdown engine, which is not Jekyll's default and needs to be installed manually.
gem install rdiscount
c:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- wdm (LoadError) from c:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/listen-1.3.1/lib/listen/adapter.rb:207:in `load_dependent_adapter' from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/listen-1.3.1/lib/listen/adapters/windows.rb:33:in `load_dependent_a dapter' ...
wdmgem could not be found. Since Jekyll only supports *nix systems officially, Windows Directory Monitor is therefore not included among Jekyll dependencies.
gem install wdm