Winseliu@WINSE ~
$ export PATH=/c/Ruby193/bin:/c/rubydev/bin:$PATH
Winseliu@WINSE ~
$ cd /c/rubydev/
Winseliu@WINSE /c/rubydev
$ ruby dk.rb init
[INFO] found RubyInstaller v1.9.3 at C:/Ruby193
Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.
Winseliu@WINSE /c/rubydev
$ ruby dk.rb install
[INFO] Updating convenience notice gem override for 'C:/Ruby193'
[INFO] Installing 'C:/Ruby193/lib/ruby/site_ruby/devkit.rb'
安装jekyll
安装的过程并非一路顺风,rubygems的官网好像被禁了。需要更新源。
1234567891011121314151617181920212223242526
Winseliu@WINSE /c
$ gem install jekyll
ERROR: Could not find a valid gem 'jekyll' (>= 0) in any repository
ERROR: Possible alternatives: jekyll
Winseliu@WINSE /c
$ gem sources --remove http://rubygems.org/
http://rubygems.org/ removed from sources
Winseliu@WINSE /c
$ gem sources -a http://ruby.taobao.org/
http://ruby.taobao.org/ added to sources
Winseliu@WINSE /c
$ gem sources -l
*** CURRENT SOURCES ***
http://ruby.taobao.org/
Winseliu@WINSE /c
$ gem install rack
Fetching: rack-1.5.2.gem (100%)
Successfully installed rack-1.5.2
1 gem installed
Installing ri documentation for rack-1.5.2...
Installing RDoc documentation for rack-1.5.2...
Winseliu@WINSE /c/rubydev
$ gem install jekyll
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Fetching: classifier-1.3.3.gem (100%)
Fetching: directory_watcher-1.4.1.gem (100%)
Fetching: syntax-1.0.0.gem (100%)
Fetching: maruku-0.6.1.gem (100%)
Fetching: kramdown-1.0.2.gem (100%)
Fetching: yajl-ruby-1.1.0-x86-mingw32.gem (100%)
Fetching: posix-spawn-0.3.6.gem (100%)
Building native extensions. This could take a while...
Fetching: pygments.rb-0.5.1.gem (100%)
Fetching: highline-1.6.19.gem (100%)
Fetching: commander-4.1.3.gem (100%)
Fetching: safe_yaml-0.7.1.gem (100%)
Fetching: colorator-0.1.gem (100%)
Fetching: jekyll-1.0.3.gem (100%)
Successfully installed fast-stemmer-1.0.2
Successfully installed classifier-1.3.3
Successfully installed directory_watcher-1.4.1
Successfully installed syntax-1.0.0
Successfully installed maruku-0.6.1
Successfully installed kramdown-1.0.2
Successfully installed yajl-ruby-1.1.0-x86-mingw32
Successfully installed posix-spawn-0.3.6
Successfully installed pygments.rb-0.5.1
Successfully installed highline-1.6.19
Successfully installed commander-4.1.3
Successfully installed safe_yaml-0.7.1
Successfully installed colorator-0.1
Successfully installed jekyll-1.0.3
14 gems installed
Installing ri documentation for fast-stemmer-1.0.2...
Installing ri documentation for classifier-1.3.3...
Installing ri documentation for directory_watcher-1.4.1...
Installing ri documentation for syntax-1.0.0...
Installing ri documentation for maruku-0.6.1...
Couldn't find file to include 'MaRuKu.txt' from lib/maruku.rb
Installing ri documentation for kramdown-1.0.2...
Installing ri documentation for yajl-ruby-1.1.0-x86-mingw32...
Installing ri documentation for posix-spawn-0.3.6...
Installing ri documentation for pygments.rb-0.5.1...
Installing ri documentation for highline-1.6.19...
Installing ri documentation for commander-4.1.3...
Installing ri documentation for safe_yaml-0.7.1...
Installing ri documentation for colorator-0.1...
Installing ri documentation for jekyll-1.0.3...
Installing RDoc documentation for fast-stemmer-1.0.2...
Installing RDoc documentation for classifier-1.3.3...
Installing RDoc documentation for directory_watcher-1.4.1...
Installing RDoc documentation for syntax-1.0.0...
Installing RDoc documentation for maruku-0.6.1...
Couldn't find file to include 'MaRuKu.txt' from lib/maruku.rb
Installing RDoc documentation for kramdown-1.0.2...
Installing RDoc documentation for yajl-ruby-1.1.0-x86-mingw32...
Installing RDoc documentation for posix-spawn-0.3.6...
Installing RDoc documentation for pygments.rb-0.5.1...
Installing RDoc documentation for highline-1.6.19...
Installing RDoc documentation for commander-4.1.3...
Installing RDoc documentation for safe_yaml-0.7.1...
Installing RDoc documentation for colorator-0.1...
Installing RDoc documentation for jekyll-1.0.3...
创建新博客
(2014年3月19日更新 Cygwin)
建立新的本地测试文件夹
123456789
Administrator@winseliu /cygdrive/c/Users/Administrator/target
$ rm -rf export
Administrator@winseliu /cygdrive/c/Users/Administrator/target
$ jekyll new export
New jekyll site installed in /cygdrive/c/Users/Administrator/target/export.
Administrator@winseliu /cygdrive/c/Users/Administrator/target
$ cd export/
修改配置_config.yml
123
name: Your New Jekyll Site
markdown: rdiscount
pygments: false
启动服务
123456789101112
Administrator@winseliu /cygdrive/c/Users/Administrator/target/export
$ jekyll serve --trace -w -P 8000
Configuration file: /cygdrive/c/Users/Administrator/target/export/_config.yml
Source: /cygdrive/c/Users/Administrator/target/export
Destination: /cygdrive/c/Users/Administrator/target/export/_site
Generating... done.
Auto-regeneration: enabled
[Listen warning]:
Listen will be polling for changes. Learn more at https://github.com/guard/listen#polling-fallback.
Server address: http://0.0.0.0:8000
Server running... press ctrl-c to stop.