码迷,mamicode.com
首页 > 其他好文 > 详细

安装jekykll

时间:2015-07-01 20:20:36      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:

最好在你的git bash下安装,据说在DOS命令下错误百出。安装过程如下:

$ gem install jekyll
Fetching: liquid-2.5.5.gem (100%)
Successfully installed liquid-2.5.5
Fetching: fast-stemmer-1.0.2.gem (100%)
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‘

还是报错了,提示我们下载安装"DevKit",这里下载安装即可,然后又提示我们在http://github.com/oneclick/rubyinstaller/wiki/Development-Kit找答案。

上面提示说:

安装了DevKit后切换到DevKit的安装目录:cd<devkit_install_dir>

执行 ruby dk.rb init 生成config.yml配置文件

最后 ruby dk.rb install 安装 DevKit 到你ruby中。对于64位操作系统来说,可能会报错:‘Invalid configuration. Please fix ‘config.yml’ and rerun ‘ruby dk.rb install’`. 解决方案是将ruby目录的绝对路径写在config.yml中,如下:

# This configuration file contains the absolute path locations of all
# installed Rubies to be enhanced to work with the DevKit. This config
# file is generated by the ‘ruby dk.rb init‘ step and may be modified
# before running the ‘ruby dk.rb install‘ step. To include any installed
# Rubies that were not automagically discovered, simply add a line below
# the triple hyphens with the absolute path to the Ruby root directory.
#
# Example:
#
# ---
# - C:/ruby19trunk
# - C:/ruby192dev
#
---
- C:\Ruby200-x64

注意规则:在---下,以 - 开头,然后空一格,然后是写ruby的绝对路径。

然后再试 ruby dk.rb install.如下提示:

$ ruby dk.rb install
[INFO] Updating convenience notice gem override for ‘C:/Ruby200-x64‘
[INFO] Installing ‘C:/Ruby200-x64/lib/ruby/site_ruby/devkit.rb‘

那么就说明安装成功了,然后就安装jekyll吧

$ gem install jekyll
Temporarily enhancing PATH to include DevKit..
Building native extensions.  This could take a
Successfully installed fast-stemmer-1.0.2
Fetching: classifier-1.3.4.gem (100%)
Successfully installed classifier-1.3.4
Fetching: rb-fsevent-0.9.4.gem (100%)
......

检测是否安装成功:

$ jekyll -v
jekyll 1.4.3

提示ok了!

安装jekykll

标签:

原文地址:http://www.cnblogs.com/liujin0505/p/4613854.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!