操作系统: Windows 8.1
Jekyll版本: jekyll 2.5.0
python版本: 2.7.8
gem -v: 2.2.2
当我运行 jekyll服务器输出时:
jekyll 2.5.0 | Error: No such file or directory @ rb_sysopen - D:/GitHub/kanlei.github.com/GitHub/kanlei.github.com/404.html
详细
配置文件:D:/GitHub/kanlei.github.com/_config.yml
资料来源:D:/GitHub/kanlei.github.com
目的地:D:/GitHub/kanlei.github.com/_site
生成......
Error reading file D:/GitHub/kanlei.github.com/_layouts/default.html: No such file or directory @ rb_sysopen - D:/GitHub/kanlei.github.com/GitHub/kanlei.github.com/_layouts/default.html
Error reading file D:/GitHub/kanlei.github.com/_layouts/page.html: No such file or directory @ rb_sysopen - D:/GitHub/kanlei.github.com/GitHub/kanlei.github.com/_layouts/page.html
Error reading file D:/GitHub/kanlei.github.com/_layouts/post.html: No such file or directory @ rb_sysopen - D:/GitHub/kanlei.github.com/GitHub/kanlei.github.com/_layouts/post.html
Error reading file D:/GitHub/kanlei.github.com/_posts/core-samples/2011-12-29-jekyll-introduction.md: No such file or directory @ rb_sysopen - D:/GitHub/kanlei.github.com/GitHub/kanlei.github.com/_posts/core-samples/2011-12-29-jekyll-introduction.md
答案 0 :(得分:2)
我得到了同样的错误。似乎jekyll 2.5.0与其他所有人都不兼容。
尝试运行此
gem uninstall jekyll
gem install jekyll -v 2.4.0
然后再次构建网站
这种方法对我有用
答案 1 :(得分:1)
我遇到了同样的问题,一直在寻找解决方案,但似乎这是一个问题 使用2.5.0版本的jekyll,特别适用于Windows。我想。
已经有一个问题报道: https://github.com/jekyll/jekyll/issues/3068
目前,我能找到的唯一解决方法是降级到jekyll 2.4.0 就像纳马姆发布的那样。
等待2.5.0的修复或更好的解决方法
答案 2 :(得分:0)
我不知道这是怎么发生的,但不知何故在我的 Jekyll 网站 repo 根目录中创建了一个名为 127.0.0.1
的文件。我的错误是这些:
jekyll 3.9.0 |错误:没有这样的设备或地址@rb_sysopen - /home/username/GS/dev/ElectricRCAircraftGuy.github.io/127.0.0.1
和
<块引用>/home/username/gems/gems/jekyll-3.9.0/lib/jekyll/utils.rb:146:in `initialize': 没有这样的设备或地址@rb_sysopen - /home/username/GS/dev/ ElectricRCAaircraftGuy.github.io/127.0.0.1 (Errno::ENXIO)
完整输出:
~/GS/dev/ElectricRCAircraftGuy.github.io$ ./run_build_site.sh
Configuration file: /home/username/GS/dev/ElectricRCAircraftGuy.github.io/_config.yml
Source: /home/username/GS/dev/ElectricRCAircraftGuy.github.io
Destination: /home/username/GS/dev/ElectricRCAircraftGuy.github.io/_site
Incremental build: disabled. Enable with --incremental
Generating...
Remote Theme: Using theme mmistakes/minimal-mistakes
jekyll 3.9.0 | Error: No such device or address @ rb_sysopen - /home/username/GS/dev/ElectricRCAircraftGuy.github.io/127.0.0.1
Traceback (most recent call last):
23: from /home/username/gems/bin/jekyll:23:in `<main>'
22: from /home/username/gems/bin/jekyll:23:in `load'
21: from /home/username/gems/gems/jekyll-3.9.0/exe/jekyll:15:in `<top (required)>'
20: from /home/username/gems/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
19: from /home/username/gems/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
18: from /home/username/gems/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
17: from /home/username/gems/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
16: from /home/username/gems/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
15: from /home/username/gems/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program'
14: from /home/username/gems/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `start'
13: from /home/username/gems/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `each'
12: from /home/username/gems/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `block in start'
11: from /home/username/gems/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:36:in `process'
10: from /home/username/gems/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:65:in `build'
9: from /home/username/gems/gems/jekyll-3.9.0/lib/jekyll/command.rb:28:in `process_site'
8: from /home/username/gems/gems/jekyll-3.9.0/lib/jekyll/site.rb:69:in `process'
7: from /home/username/gems/gems/jekyll-3.9.0/lib/jekyll/site.rb:164:in `read'
6: from /home/username/gems/gems/jekyll-3.9.0/lib/jekyll/reader.rb:16:in `read'
5: from /home/username/gems/gems/jekyll-3.9.0/lib/jekyll/reader.rb:45:in `read_directories'
4: from /home/username/gems/gems/jekyll-3.9.0/lib/jekyll/reader.rb:45:in `select'
3: from /home/username/gems/gems/jekyll-3.9.0/lib/jekyll/reader.rb:46:in `block in read_directories'
2: from /home/username/gems/gems/jekyll-3.9.0/lib/jekyll/utils.rb:146:in `has_yaml_header?'
1: from /home/username/gems/gems/jekyll-3.9.0/lib/jekyll/utils.rb:146:in `open'
/home/username/gems/gems/jekyll-3.9.0/lib/jekyll/utils.rb:146:in `initialize': No such device or address @ rb_sysopen - /home/username/GS/dev/ElectricRCAircraftGuy.github.io/127.0.0.1 (Errno::ENXIO)
所以,奇怪的是,我的解决方案是删除那个 127.0.0.1
文件:
rm 127.0.0.1
已修复!
现在,这很好用:
bundle exec jekyll serve --livereload --drafts --unpublished