【问题标题】:Rake Preview not working in Octopress耙子预览在 Octopress 中不起作用
【发布时间】:2013-07-04 08:26:16
【问题描述】:

我的机器上安装了 ruby​​ 版本 1.9.3,并正在为我的个人网站开发一个 octopress 项目。

我将 rvm 用于我的 gem,并遵循 octopress.org 记录的所有步骤。但是我在我的 rake 服务器中发现了一些错误。这是我的命令日志。

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$ 

任何人都可以帮助我。 丁昂林

【问题讨论】:

  • 那里没有错误 - 只是警告 octopress 使用现在未维护的库
  • 127.0.0.1 - - [04/Jul/2013 14:50:34] "GET /favicon.ico HTTP/1.1" 404 - 0.0015 显示此内容时,我返回浏览器没有显示在localhost:4000
  • 是否有要显示的索引文件?检查生成的文件以查看生成的内容
  • 如果生成的索引在 public/mysite 那么你必须点击 localhost:4000/mysite 才能看到文件
  • 您是否按了 Ctr + C(只是好奇地看到您的命令)?您必须先让它运行并检查。

标签: ruby-on-rails ruby octopress


【解决方案1】:

由@Frederick 的评论解决并关闭了这个帖子。

回答

如果生成的索引在 public/mysite 中,那么你必须点击 localhost:4000/mysite 查看文件 -

【讨论】:

  • 我也开始遇到这个问题,可能是因为升级到小牛。我只是在 _deploy 目录中运行 http-server(从 npm 安装)并且它可以工作。任何开发 http 服务器都应该这样做。
猜你喜欢
  • 1970-01-01
  • 2011-11-14
  • 1970-01-01
  • 1970-01-01
  • 2014-09-01
  • 2013-12-28
  • 2016-11-15
  • 2018-09-01
  • 2015-03-06
相关资源
最近更新 更多