简体   繁体   English

Jekyll /gems/jekyll-4.0.0/lib/jekyll/cache.rb:171:in `load': 到达文件末尾(EOFError)

[英]Jekyll /gems/jekyll-4.0.0/lib/jekyll/cache.rb:171:in `load': end of file reached (EOFError)

when I try run jekyll serve --trace this error message appears:当我尝试运行jekyll serve --trace出现此错误消息:

Configuration file: /Users/John/Projects/contrast/_config.yml
Traceback (most recent call last):
    19: from /usr/local/bin/jekyll:23:in `<main>'
    18: from /usr/local/bin/jekyll:23:in `load'
    17: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.0.0/exe/jekyll:15:in `<top (required)>'
    16: from /Library/Ruby/Gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
    15: from /Library/Ruby/Gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
    14: from /Library/Ruby/Gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
    13: from /Library/Ruby/Gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
    12: from /Library/Ruby/Gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
    11: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.0.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
    10: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `process_with_graceful_fail'
     9: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `each'
     8: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail'
     7: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:30:in `process'
     6: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:30:in `new'
     5: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:33:in `initialize'
     4: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:113:in `reset'
     3: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.0.0/lib/jekyll/cache.rb:41:in `clear_if_config_changed'
     2: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.0.0/lib/jekyll/cache.rb:86:in `[]'
     1: from /Library/Ruby/Gems/2.6.0/gems/jekyll-4.0.0/lib/jekyll/cache.rb:171:in `load'
/Library/Ruby/Gems/2.6.0/gems/jekyll-4.0.0/lib/jekyll/cache.rb:171:in `load': end of file reached (EOFError)

This is my important parts of my _confing.yml file:这是我的_confing.yml文件的重要部分:

title: "Blog Title"
author: "Blog Author"
description: "Made with <b style=\"color: #f45;\">&lt;3</b>"
permalink: /:title/
lang: "en"
date_format: "%B %d, %Y"

plugins:
 - jekyll-feed

How can I solve this so jekyll can run normally ?我该如何解决这个问题,这样 jekyll 才能正常运行? Thank you for any help.感谢您的任何帮助。

Cause原因

I run out of disk space during site generation and it made some corrupted files.我在站点生成期间用完了磁盘空间,并且它制作了一些损坏的文件。

Solution解决方案

Solution to this problem was to delete _site and .jekyll-cache and directories and run jekyll serve --trace again.这个问题的解决方案是删除_site.jekyll-cache和目录,然后再次运行jekyll serve --trace (Yes you have to delete both of them). (是的,你必须删除它们)。 Obviously I made more disk space to prevent this error.显然我腾出了更多的磁盘空间来防止这个错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM