搭建ruby环境:
1、ruby安装包:ruby-2.0.0-p247.tar.gz(RubyGems 镜像 - 淘宝网);
2、开发组件(Development Kit):DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe
note:不安装组件包时,直接安装jekyll(gem install jekyll),会报这样的错误:
ERROR: Error installing jekyll:
The 'fast-stemmer' native gem requires installed build tools.
Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
安装jekyll:
gem install jekyll
启动jekyll服务器
如果使用 j'e'kyll serve启动服务报如下错误:
$ jekyll serve
Configuration file: d:/repository/my-blog/_config.yml
Source: d:/repository/my-blog
Destination: d:/repository/my-blog/_site
Generating... Error reading file d:/repository/my-blog/index.html: invalid
byte sequence in GBK
Liquid Exception: invalid byte sequence in GBK in index.html
error: invalid byte sequence in GBK. Use --trace to view backtrace
请参考这里:
Jekyll在Windows下面中文编码问题解决方案
参考: