jekyll本地安装预览

下定决心把本地预览安装好,花了2天时间终于搞定。主要还是靠网上的教程,一步一步慢慢试。

window7 X64系统

1、Ruby 安装

ruby下载地址:http://rubyinstaller.org/downloads/

2、安装DevKit

DevKit下载地址:http://rubyinstaller.org/downloads/

  • 解压到一个文件夹下,如c:\devkit
  • cmd进入该地址,即c:\devkit
  • 输入ruby dk.rb init
  • 输入ruby dk.rb install
  • 检查是否安装成功:gem install rdiscount –platform=ruby

3、安装jekyll

  • gem install jekyll
  • 进入项目文件
  • jekyll serve
安装gem install jekyll 过程中可能会报如下错误:
ERROR:  Could not find a valid gem 'jekyll' (>= 0), here is why:
          Unable to download data from https://ruby.taobao.org/ - SSL_connect re
turned=1 errno=0 state=SSLv3 read server certificate B: certificate verify faile
d (https://ruby.taobao.org/specs.4.8.gz)

解决方法:(更换配置源)

在运行过程中会出现错误,则需要安装相关依赖。比如:

Dependency Error: Yikes! It looks like you don’t have jekyll-paginate or one of its dependencies installed. In order to use Jekyll as currently configured, you’ll need to install this gem. The full error message from Ruby is: ‘cannot load such file – jekyll-paginate’ If you run into trouble, you can find helpful resources at Getting Help

jekyll 3.1.2 | Error: jekyll-paginate

解决办法: gem install jekyll-paginate

有时候可能会有版本冲突,解决办法是先删除老版本(gem uninstall ...),再安装新版本

4、参考文章:

显示 Gitment 评论