<!DOCTYPE html>
html
<header> <p>Dec 22, 2014 • CoderSimple <a href="http://codersimple.github.io/jekyll/2014/12/22/run-jekyll-on-windows.html">原文传送阵</a></p> </header> <article> <p><a href="http://jekyll-windows.juthilo.com/1-ruby-and-devkit/">Run jukyll on windows 教程</a></p>
参照官方教程搭建,这里仅列出在搭建过程当中遇到的问题。git
ruby dk.rb install
Q: Invalid configuration. Please fix 'config.yml.
A: 把 config.yml 后面添加 ruby 安装的绝对路径,而且要写两行github
# 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: 这里是默认配置的源的问题(也多是由代理引发的,最好把代理所有关闭),解决方法以下:windows
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分钟同步一次
当你完成了环境的搭建了之后,想要运行看结果,去那里运行?怎么运行?ruby
~ $ jekyll new blog ~ $ cd blog ~/blog $ jekyll serve # => Now browse to http://localhost:4000
</article>
</div>