0

开始更新我的网站。前几天它工作正常,但现在我收到一个错误。

我通常在 CMD 上输入(我在 Windows 10 上)“bundle exec Jekyll serve --watch”,然后服务器就会运行。我可以编辑和保存,刷新后它全部反映在浏览器中。

现在我可以做到这一点,但是如果我对任何文件进行一次更改,它就可以工作。再做一次更改,我得到一个错误。我必须终止并再次输入。

以下是错误:

D:\Tristen Grant\Documents\GitHub\portfolio>bundle exec jekyll serve --watch
DL is deprecated, please use Fiddle
Configuration file: D:/Tristen Grant/Documents/GitHub/portfolio/_config.yml
    Source: D:/Tristen Grant/Documents/GitHub/portfolio
    Destination: D:/Tristen Grant/Documents/GitHub/portfolio/_site
 Incremental build: disabled. Enable with --incremental
    Generating...
    done in 0.595 seconds.
Auto-regeneration: enabled for 'D:/Tristen Grant/Documents/GitHub/portfolio'
Configuration file: D:/Tristen Grant/Documents/GitHub/portfolio/_config.yml
    Server address: http://127.0.0.1:3000//
Server running... press ctrl-c to stop.
    Regenerating: 1 file(s) changed at 2016-09-06 16:16:28 ...done in 0.521498 seconds.
Regenerating: 1 file(s) changed at 2016-09-06 16:16:30 ...error:
    Error: No such file or directory - git rev-parse HEAD
    Error: Run jekyll build --trace for more information.
[2016-09-06 16:19:35] ERROR Errno::ENOTSOCK: An operation was attempted on something that is not a socket.
    C:/Ruby21-x64/lib/ruby/2.1.0/webrick/server.rb:170:in `select'
Terminate batch job (Y/N)? y
Terminate batch job (Y/N)? y

我正在使用 Ruby 2.1.5 64 位版本。RubyDevKit,萨斯,波旁威士忌。

任何想法如何解决这一问题?我对 Jekyll 或 ruby​​ 了解不多。刚开始。

4

1 回答 1

0

我在 CMD 中也遇到了这个错误。你应该已经安装了github 的桌面应用程序;尝试从您使用该应用程序获得的 GitShell 运行相同的命令。

对我来说,它省去了在 Windows 上全局安装 git 并进行设置的麻烦。

于 2016-10-05T19:35:46.467 回答