Install Jekyll To Fix Some Local Github-pages Defects

Published: 21 Nov 2015 Category: web_dev

Install jekyll

I follow the blog: to install Ruby, Devkit, and Jekyll.

  1. Download Ruby and DevKit:

  2. Check “Add Ruby executables to your PATH” when installing Ruby. You can execute:

ruby -v

to detect if Ruby successfully installed.

  1. Install DevKit. After that, cd to RubyDevKit directory:
C:\> cd RubyDevKit
C:\RubyDevKit> ruby dk.rb init
C:\RubyDevKit> ruby dk.rb install

Intall github-pages

When I try to install github-pages by “gem install github-pages”, an error(FetchError) is encountered:

Seems like it is because the Ruby website is blocked. So I follow the instructions by @fighterleslie in, create a .gemrc file into “C:\Users\MyName”, and problem solved:

:update_sources: true

You may still encounter this FetchError:

I found a workaround here (Really a “workaround”. It opens a possible security vulnerability): add the line to your .gemrc file:

:ssl_verify_mode: 0

So now my .gemrc file is like:

:ssl_verify_mode: 0
:update_sources: true

Anyway, now jekyll is successfully installed on my system.

Try jekyll build!

Follow to detect my github-pages defects.

OK, try the instruction below:

$ jekyll build --safe

Then I get:

Follow the error information, do some minor changes, and finally my github-pages can successfully be shown.

Don’t miss the chance to use jekyll to preview your site! Running the line:

jekyll serve –watch

and then open website http://localhost:4000/ in browser. If want to open a specific page, use http://localhost:4000/web_dev/2015/11/21/install-jekyll.html.

Something else to note..

The above-mentioned instructions just work fine for me on my laptop(Windows 8.1, X64). But some other errors may happen, like Cygwin and Windows git can’t play nicely together(on my work PC, Windows 7, X32, with Cygwin installed). One particulr error message is like:

When I try to execute a “gem install github-pages”.

I found two posts helpful:

In a nutshell, I download rebase-1.18-1.exe from, run it. Go to RubyDevkit directory, run devkitvars.bat. Fire up a git bash (or Windows Prompt, must run as administrator), execute instruction below:

$ rebase.exe -b 0x50000000 msys-1.0.dll

Retry gem install github-pages. Now voila, everything works nicely!