1

我尝试在 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

我想要的只是能够打开并运行该网站的本地版本。任何帮助将不胜感激。

4

1 回答 1

0

检查您的端口 4000 是否未被其他设备使用,或者您是否有防火墙启用对它的访问。

我非常不推荐 Windows 用于 jekyll(或任何 ruby​​ gem/app),在 Linux 中安装和使用它会容易得多。

于 2013-07-15T02:18:30.880 回答