【问题标题】:Serve --watch not working in jekyll服务 --watch 在 jekyll 中不起作用
【发布时间】:2014-11-01 23:57:22
【问题描述】:

我遇到了 jekyll 的问题。我想我最终会尝试一下,所以我用 Windows 所需的 gem 清理安装了它(运行 windows 7 64 位)。我继续使用

jekyll new Test

然后 cd 进入测试目录并使用

jekyll serve --watch

它会标记这个

Configuration file: C:/Users/Defa1t/Desktop/Test/_config.yml
            Source: C:/Users/Defa1t/Desktop/Test
       Destination: C:/Users/Defa1t/Desktop/Test/_site
      Generating...
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3.9/lib/posix
/spawn.rb:164: warning: cannot close fd before spawn
'which' is not recognized as an internal or external command,
operable program or batch file.
←[31m  Liquid Exception: undefined method `[]' for nil:NilClass in _posts/2014-1
1-01-welcome-to-jekyll.markdown←[0m
jekyll 2.4.0 | Error:  undefined method `[]' for nil:NilClass

有人知道这个问题吗?

【问题讨论】:

  • 让我猜猜:Windows?我有类似的问题。似乎与用于荧光笔的 Python 版本有关。不过还没解决。
  • 我不明白为什么有人反对这个。

标签: ruby windows jekyll


【解决方案1】:

我找到的唯一解决方案——我希望它也适用于你——是使用旧版本的 Python(是的,Python,而不是 Ruby——问题可能是荧光笔)。

  • 在名为 C:\Python27 的目录中安装 Python 2.7
  • 将您的 PATH 环境变量更改为将 C:\Python27C:\Python27\Scripts 作为第一个条目。我为此使用了快速环境编辑器。当然,您也可以编写一个简单的批处理文件,将其添加到现有条目的前面:

    SET PATH=C:\Python27\;C:\Python27\Scripts\;%PATH%
    
  • 看看它是否有效。它对我有用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-31
    • 1970-01-01
    • 1970-01-01
    • 2023-03-30
    • 2015-04-14
    相关资源
    最近更新 更多