Dec 22, 2014 • CoderSimple 原文传送阵
参照官方教程搭建,这里仅列出在搭建过程中遇到的问题。
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