Octopress中的Rake预览无法正常工作。

6

我在电脑上安装了 Ruby 1.9.3 版本,并且正在为个人网站上的 Octopress 项目工作。

我使用 rvm 管理我的 gem,并且按照 octopress.org 的文档步骤进行操作。但是,我发现我的 rake server 中出现了一些错误。以下是我的命令日志。

Tin-Aung-Linn:octopress tal$ ruby --version
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.4.0]
Tin-Aung-Linn:octopress tal$ rake generate
## Generating Site with Jekyll
identical source/stylesheets/screen.css 
Configuration from /Users/tal/Sites/mysite.com/octopress/_config.yml
Building site: source -> public/github
Successfully generated site: source -> public/github
Tin-Aung-Linn:octopress tal$ rake preview
Starting to watch source with Jekyll and Compass. Starting Rack on port 4000
Configuration from /Users/tal/Sites/mysite.com/octopress/_config.yml
[2013-07-04 14:50:23] INFO  WEBrick 1.3.1
[2013-07-04 14:50:23] INFO  ruby 1.9.3 (2013-06-27) [x86_64-darwin12.4.0]
[2013-07-04 14:50:23] INFO  WEBrick::HTTPServer#start: pid=51669 port=4000
Auto-regenerating enabled: source -> public/github
[2013-07-04 14:50:23] regeneration: 112 files changed
>>> Change detected at 14:50:23 to: screen.scss
identical public/github/stylesheets/screen.css 

Dear developers making use of FSSM in your projects,
FSSM is essentially dead at this point. Further development will
be taking place in the new shared guard/listen project. Please
let us know if you need help transitioning! ^_^b
- Travis Tilley

>>> Compass is watching for changes. Press Ctrl-C to Stop.
127.0.0.1 - - [04/Jul/2013 14:50:34] "GET / HTTP/1.1" 404 - 0.0208
127.0.0.1 - - [04/Jul/2013 14:50:34] "GET /favicon.ico HTTP/1.1" 404 - 0.0015
^C
[2013-07-04 14:50:41] INFO  going to shutdown ...
Tin-Aung-Linn:octopress tal$ 

有人可以帮我吗?

Tin Aung Linn


那里没有错误 - 只是一个警告,Octopress使用了一个现在不再维护的库。 - Frederick Cheung
127.0.0.1 - - [04/Jul/2013 14:50:34] "GET /favicon.ico HTTP/1.1" 404 - 0.0015当我展示这个时,我回到我的浏览器,但在 http://localhost:4000 上没有显示任何内容。 - Tin Aung Lin
有索引文件可以显示吗?请检查生成的文件以查看已生成的内容。 - Frederick Cheung
3
如果生成的索引位于public/mysite文件夹中,那么你需要访问localhost:4000/mysite才能查看文件。 - Frederick Cheung
1
你按了Ctr + C吗(只是好奇在你的命令中看到了)?你必须让它运行并先检查。 - Winn Minn Soe
显示剩余3条评论
1个回答

2

由@Frederick的评论解决并关闭了此线程。

答案

如果生成的索引位于public/mysite中,则需要访问localhost:4000/mysite才能查看文件。


我也开始遇到这个问题了,可能是由于升级到Mavericks导致的。我只需在_deploy目录中运行从npm安装的http-server即可正常工作。任何开发用的http服务器都可以。 - davidjnelson

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接