run jekyll on windows

Dec 22, 2014 • CoderSimple 原文传送阵

Run jukyll on windows 教程

参照官方教程搭建,这里仅列出在搭建过程中遇到的问题。

ruby dk.rb install
Q: Invalid configuration. Please fix 'config.yml.
A: 把 config.yml 后面添加 ruby 安装的绝对路径,并且要写两行

# 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
#
---
- D:\Ruby200-x64
- D:\Ruby200-x64

gem install jekyll
Q: Could not find a valid gem 'jekyll' (>= 0), here is why:Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT: Operation timed out - connect(2) (https://rubygems.org/latest_specs.4.8.gz)
A: 这里是默认配置的源的问题(也可能是由代理引起的,最好把代理全部关闭),解决方法如下:

test1: gem install jekyll --source http://rubygems.org/

test2: gem update jekyll --source http://rubygems.org/
       gem install jekyll

test3: gem sources --remove https://rubygems.org/
       gem sources -a http://rubygems.org/

test4: gem sources --remove https://rubygems.org/
       gem sources -a https://ruby.taobao.org/

以上的原理都一样,因此都列出了,测试结果:
test1 测试失败,貌似更改不成功
test2 测试失败,指定了貌似也没有用
test3 测试成功
test4 未测试,这里是换成国内的镜像,15分钟同步一次

当你完成了环境的搭建了以后,想要运行看结果,去那里运行?怎么运行?

~ $ jekyll new blog
~ $ cd blog
~/blog $ jekyll serve
# => Now browse to http://localhost:4000
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值