undefined method `start_with?' for nil:NilClass #19

mutsuda opened this Issue Mar 7, 2016 · 16 comments


None yet

6 participants

mutsuda commented Mar 7, 2016

Using jekyll-3.1.2, and after setting up octopress, server

Liquid Exception: undefined method `start_with?' for nil:NilClass in _jobs/2016-02-25-Software-Developer.md
/Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll.rb:156:in `sanitized_path': undefined method `start_with?' for nil:NilClass (NoMethodError)
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/site.rb:355:in `block in in_source_dir'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/site.rb:354:in `each'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/site.rb:354:in `reduce'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/site.rb:354:in `in_source_dir'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/liquid_renderer.rb:16:in `file'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/renderer.rb:106:in `render_liquid'
    from /Users/.rvm/gems/ruby-2.2.3/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:311:in `render_liquid'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/renderer.rb:61:in `run'
    from /Users/.rvm/gems/ruby-2.2.3/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:306:in `run'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/site.rb:171:in `block (2 levels) in render'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/site.rb:169:in `each'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/site.rb:169:in `block in render'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/site.rb:168:in `each'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/site.rb:168:in `render'
    from /Users/.rvm/gems/ruby-2.2.3/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:197:in `render'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/site.rb:59:in `process'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/command.rb:26:in `process_site'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/commands/build.rb:60:in `build'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/commands/build.rb:33:in `process'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/lib/jekyll/commands/serve.rb:34:in `block (2 levels) in init_with_program'
    from /Users/.rvm/gems/ruby-2.2.3/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
    from /Users/.rvm/gems/ruby-2.2.3/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
    from /Users/.rvm/gems/ruby-2.2.3/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
    from /Users/.rvm/gems/ruby-2.2.3/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
    from /Users/.rvm/gems/ruby-2.2.3/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
    from /Users/.rvm/gems/ruby-2.2.3/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
    from /Users/.rvm/gems/ruby-2.2.3/gems/jekyll-3.1.2/bin/jekyll:13:in `<top (required)>'
    from /Users/.rvm/gems/ruby-2.2.3/bin/jekyll:23:in `load'
    from /Users/.rvm/gems/ruby-2.2.3/bin/jekyll:23:in `<main>'
    from /Users/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
    from /Users/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'

What am I doing wrong? It works perfectly without Octopress, and the _job/2016-02-25-Software-Developer.md doesn't have any empty parameters in its front metal.


Adding octopress hooks pointing to the git master seems to solve that bug for me.

group :jekyll_plugins do
  gem 'octopress-hooks', git: 'https://github.com/octopress/hooks.git'
  gem 'octopress-paginate'
pronvit commented May 23, 2016

I'm getting this error with latest versions of all gems. Basically, clean installation of octopress stops working after I add octopress-paginate.

XhmikosR commented Jul 5, 2016

Can this be sorted once and for all? @CyberStrike's workaround works but I'm not sure for how long in the future.

parkr commented Jul 5, 2016

Do we just need another release?

XhmikosR commented Jul 5, 2016

@parkr: yes and perhaps cherry pick the deprecation warnings fix from #24. Although, in a project I tried the latest release, I ended up with permalinks without the post name, i.e. foo/yy/mm/dd/.

I should probably make a new issue but this is the branch if you have time to try XhmikosR/website@a2d02ba

XhmikosR commented Jul 6, 2016

Scratch my previous issue; it was because of the post filename having only dates.

Still, I believe we need a new release with the Jekyll compatibility and the reverse addition as soon as possible.

XhmikosR commented Jul 9, 2016

So, @parkr, can you sort these couple of things and make a new release? This gem seems to cover the gap we have in Jekyll so with these fixes it should be a lot more usable.

parkr commented Jul 9, 2016

I'll check in with @imathis – I'm actually not sure I have access and it may be better for him to help out as he knows this code base better.


Bump @imathis


I guess fixing this will also fix the same issue with octopress-solarized that I referenced above? (and codeblock and codefence)


@parkr: can you bug @imathis to sort this, Jekyll 3 warnings and #12?

XhmikosR commented Aug 9, 2016

@parkr: @imathis: seems M.I.A. Can you or someone else sort these issues and cut a new release?

parkr commented Aug 9, 2016
XhmikosR commented Aug 9, 2016

That's too bad. Is there any other way you can ping the owner?

In the meantime can we get a the fixes merged and a tag out? People could
use the tag at least.

On Aug 9, 2016 9:31 PM, "Parker Moore" notifications@github.com wrote:

I don't have access :( https://rubygems.org/gems/octopress-paginate

You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#19 (comment),
or mute the thread


So any news @parkr ?

@parkr parkr referenced this issue in octopress/hooks Aug 24, 2016

Release v2.6.2 #15

@parkr parkr closed this Aug 24, 2016
parkr commented Aug 24, 2016

v2.6.2 of octopress-hooks (not yet out, but asking Brandon to release) should fix this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment