<!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>