Install Jekyll To Fix Some Local Github-pages Defects
I follow the blog: http://blog.csdn.net/itmyhome1990/article/details/41982625 to install Ruby, Devkit, and Jekyll.
Download Ruby and DevKit: http://rubyinstaller.org/downloads/
Check “Add Ruby executables to your PATH” when installing Ruby. You can execute:
to detect if Ruby successfully installed.
- Install DevKit. After that, cd to RubyDevKit directory:
C:\> cd RubyDevKit C:\RubyDevKit> ruby dk.rb init C:\RubyDevKit> ruby dk.rb install
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 http://segmentfault.com/q/1010000003891086, create a .gemrc file into “C:\Users\MyName”, and problem solved:
:sources: - https://ruby.taobao.org :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:
So now my .gemrc file is like:
:ssl_verify_mode: 0 :sources: - https://ruby.taobao.org :update_sources: true
Anyway, now jekyll is successfully installed on my system.
Try jekyll build!
Follow http://rockhong.github.io/github-pages-fails-to-update.html 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
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 http://www.tishler.net/jason/software/rebase/, 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
gem install github-pages. Now voila, everything works nicely!