无法在Windows 7中以--watch模式启动Jekyll服务器

无法在Windows 7中以--watch模式启动Jekyll服务器,jekyll,Jekyll,我正在尝试在Windows7中以--watch模式运行Jekyll服务器。但它无法启动并抛出错误消息: blog [ master ] > jekyll server --trace --watch Configuration file: C:/vraa/repo/blog/_config.yml Source: C:/vraa/repo/blog Destination: C:/vraa/repo/blog/_site Generatin

我正在尝试在Windows7中以--watch模式运行Jekyll服务器。但它无法启动并抛出错误消息:

blog [ master ] > jekyll server --trace --watch
Configuration file: C:/vraa/repo/blog/_config.yml
            Source: C:/vraa/repo/blog
       Destination: C:/vraa/repo/blog/_site
      Generating...
                    done.
C:/Ruby193/lib/ruby/gems/1.9.1/gems/listen-2.7.7/lib/listen/adapter/windows.rb:21:in `rescue in usable?': undefined method `_log' for Listen::Adapter::Windows:Class (NoMethodError)
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/listen-2.7.7/lib/listen/adapter/windows.rb:17:in `usable?'
构建jekyll站点并启动服务器成功时,
--watch
模式失败

有什么想法吗


我在Windows7中使用的是Jekyll版本2.0.03,64位,我的ruby版本是1.9.3

找出了问题所在。正是“监听”ruby gem版本导致jekyll以
--watch
模式启动。将“listen”gem恢复为旧版本,然后服务器可以正常启动(尽管有警告,但没有显示停止)


将您的“listen”gem更新到2.7.8

Jekyll(v1.0+)的较新版本中有一些更改。
--server
命令现在已过时。要在监视模式下运行服务器,请键入以下内容:

jekyll serve --watch
另外,运行以下命令将您的listen ruby gem更新为2.7.8(于2014年6月12日发布),该版本修复了您的bug:

gem update listen

这应该可以让你运行起来。

本文帮助我解决了Win10上Jekyll 3.3.0的类似问题。参见“可能不起作用”部分:

gem update listen