What does “Liquid error: private method `gsub' called for nil:NilClass” mean on a posterous blog?

拜拜、爱过 提交于 2019-12-10 13:09:19

问题


I have faced an issue with this message on the right side of my blog. Could you please help me out?


回答1:


I just ran into this error too. You're probably running a liquid filter on a value that is coming up nil. I had something like this on my jekyll site:

<title>{{ page.title | xml_escape }}</title>

And on my root page, the title was not set. You can fix it by making sure that the value is set, or you can hack around with with something like this to force the nil into a string:

{{ page.title | append:' ' | xml_escape }}

Hope this helps you out.



来源:https://stackoverflow.com/questions/3031229/what-does-liquid-error-private-method-gsub-called-for-nilnilclass-mean-on

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!