我尝试在Windows 7上安装Jekyll。我遵循了本指南http://www.testically.org/2012/02/02/installing-jekyll-and-ruby-on-windows/ 所以我首先下载了Ruby并将\; C:\ Ruby193 \ bin添加到路径变量中。 然后我下载了DevKit并将\; C:\ Users \ jimmy \ Downloads \ teeheeband \ bin \添加到路径变量中。 然后我打开我的命令并执行以下操作(按顺序) cd; C:\ Users \ jimmy \ Downloads \ teeheeband ruby dk.rb init ruby dk.rb install
以下是我执行上述步骤时屏幕上显示的代码。
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\jimmy>cd ;C:\Users\jimmy\Downloads\teeheeband
C:\Users\jimmy\Downloads\teeheeband>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.
C:\Users\jimmy\Downloads\teeheeband>ruby dk.rb install
[INFO] Skipping existing gem override for 'C:/Ruby193'
[WARN] Skipping existing DevKit helper library for 'C:/Ruby193'
C:\Users\jimmy\Downloads\teeheeband>gem install jekyll
Successfully installed jekyll-0.12.0
1 gem installed
Installing ri documentation for jekyll-0.12.0...
Installing RDoc documentation for jekyll-0.12.0...
C:\Users\jimmy\Downloads\teeheeband>
完成上述操作后,我下载了github并克隆了我想要处理的repo。然后我去了Gitshell并做了以下
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
C:\Users\jimmy\Documents\GitHub> cd prog694.github.com
C:\Users\jimmy\Documents\GitHub\prog694.github.com [new-branch]> jekyll --server
--auto
Configuration from C:/Users/jimmy/Documents/GitHub/prog694.github.com/_config.ym
l
Auto-regenerating enabled: C:/Users/jimmy/Documents/GitHub/prog694.github.com ->
C:/Users/jimmy/Documents/GitHub/prog694.github.com/_site
[2013-02-03 20:19:00] regeneration: 402 files changed
[2013-02-03 20:19:01] INFO WEBrick 1.3.1
[2013-02-03 20:19:01] INFO ruby 1.9.3 (2013-01-15) [i386-mingw32]
[2013-02-03 20:19:01] INFO WEBrick::HTTPServer#start: pid=4036 port=4000
[2013-02-03 20:20:24] ERROR no access permission to `/'
jimmy-PC - - [03/Feb/2013:20:20:24 Atlantic Standard Time] "GET / HTTP/1.1" 403
283
- -> /
[2013-02-03 20:20:24] ERROR `/favicon.ico' not found.
jimmy-PC - - [03/Feb/2013:20:20:24 Atlantic Standard Time] "GET /favicon.ico HTT
P/1.1" 404 281
- -> /favicon.ico
最后,我打开了一个浏览器并尝试通过localhost:4000运行该网站的本地副本 我失败了,收到了这条消息
Forbidden
no access permission to `/'
WEBrick/1.3.1 (Ruby/1.9.3/2013-01-15) at 127.0.0.1:4000
so I used h**p://127.0.0.1:4000/( replace t with **)
再次失败
Forbidden
no access permission to `/'
WEBrick/1.3.1 (Ruby/1.9.3/2013-01-15) at 127.0.0.1:4000
我想要的就是能够打开并运行本网站的本地版本。任何帮助将不胜感激。
答案 0 :(得分:1)
检查您的端口4000是否未被其他用户使用,或者您是否有防火墙允许访问它。
我非常不喜欢Windows for jekyll(或任何ruby gem / app),在Linux中安装和使用它会容易得多。