杰基尔(Jekyll)的“-自动"不起作用?

问题描述:

我刚刚重新安装了整个系统,然后再次开始处理我的项目.我曾经使用过,现在仍在使用Jekyll,但是我在使用--auto_config.ymlauto: true自动生成时遇到了问题.它根本不起作用. jekyll --server --auto的输出是:

I have just reinstalled my whole system and started working on my projects again. I used and still use Jekyll in some of them however I have a problem with auto generation using --auto or _config.yml's auto: true. It simply doesn't work. The output for jekyll --server --auto is:

Configuration from /home/rafal/Documents/Projects/ruby-adventure/_config.yml
Auto-regenerating enabled: /home/rafal/Documents/Projects/ruby-adventure -> /home/rafal/Documents/Projects/ruby-adventure/_site
[2013-03-23 19:09:53] regeneration: 1 files changed
[2013-03-23 19:09:53] INFO  WEBrick 1.3.1
[2013-03-23 19:09:53] INFO  ruby 2.0.0 (2013-02-24) [x86_64-linux]
[2013-03-23 19:09:53] WARN  TCPServer Error: Address already in use - bind(2)
[2013-03-23 19:09:53] INFO  WEBrick::HTTPServer#start: pid=3288 port=4000
[2013-03-23 19:09:53] regeneration: 1 files changed
[2013-03-23 19:09:54] regeneration: 1 files changed
[2013-03-23 19:09:54] regeneration: 1 files changed
[2013-03-23 19:09:54] regeneration: 1 files changed
[2013-03-23 19:09:54] regeneration: 1 files changed
[2013-03-23 19:09:54] regeneration: 1 files changed
[2013-03-23 19:09:54] regeneration: 1 files changed

jekyll --no-auto --server的输出是:

Configuration from /home/rafal/Documents/Projects/ruby-adventure/_config.yml
Building site: /home/rafal/Documents/Projects/ruby-adventure -> /home/rafal/Documents/Projects/ruby-adventure/_site
Successfully generated site: /home/rafal/Documents/Projects/ruby-adventure -> /home/rafal/Documents/Projects/ruby-adventure/_site
[2013-03-23 19:12:31] INFO  WEBrick 1.3.1
[2013-03-23 19:12:31] INFO  ruby 2.0.0 (2013-02-24) [x86_64-linux]
[2013-03-23 19:12:31] WARN  TCPServer Error: Address already in use - bind(2)
[2013-03-23 19:12:31] INFO  WEBrick::HTTPServer#start: pid=3327 port=4000

...因此没有错误弹出.该网站可以正常运行,但是当我更改文件时,不会自动重新生成该文件.有什么想法吗?

...so no error pops up. The site generates fine but when I change a file, it isn't auto regenerated. Any ideas why?

似乎是由directory_watcher gem的最新更改引起的.回滚宝石对我来说解决了这个问题:

Seems to be caused by recent changes to the directory_watcher gem. Rolling the gem back fixed the issue for me:

sudo gem uninstall directory_watcher && sudo gem install directory_watcher -v 1.4.1