与破碎的前置物jekyll,如何找到破损的文件? [英] jekyll with broken front matter, how to find the broken file?

查看:136
本文介绍了与破碎的前置物jekyll,如何找到破损的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  /.../ 

psych.rb:203:在`parse'中:(<未知>):找不到期望的
':'在第6行扫描一个简单的键1
(Psych :: SyntaxError)
from /.../psych.rb:203:in`parse_stream'
from /.../psych.rb:151:in`parse'
from ....

您知道一种告诉哪个文件导致问题的方法吗?

我知道我可以使用DTrace,如下所示:

  dtrace -n'syscall :: open *: entry {printf(%s%s,execname,copyinstr(arg0)); } | grep_posts 

但我正在寻找更直接的东西。


解决方案

引入了更严格的yaml解析器:Psych可能具有不同的异常层次结构,因此它不能被jekyll正确处理。


When I make a syntax error in the front matter i'm getting the following error:

 /.../psych.rb:203:in `parse': (<unknown>): could not find expected
 ':' while scanning a simple key at line 6 column 1
 (Psych::SyntaxError)
        from /.../psych.rb:203:in `parse_stream'
        from /.../psych.rb:151:in `parse'
            from ....

Do you know a way to tell what file caused the problem?

I know that I could probably use DTrace as follows:

dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }'| grep _posts

But I'm looking for something more straight forward.

解决方案

it seams that jekyll does not work well on ruby 1.9.3. A more restrictive yaml parser was introduced: Psych that probably has different exception hierarchy and there for it is not properly handled by jekyll.

这篇关于与破碎的前置物jekyll,如何找到破损的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆