octopress / paginate

A simple paginator for Jekyll sites.
MIT License
105 stars 37 forks source link

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

Closed mutsuda closed 8 years ago

mutsuda commented 8 years ago

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.

CyberStrike commented 8 years ago

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'
end
pronvit commented 8 years ago

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 8 years ago

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 8 years ago

Do we just need another release?

XhmikosR commented 8 years ago

@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 https://github.com/XhmikosR/website/commit/a2d02ba0ce7135e6959ad9d781b7490ff3c555c2

XhmikosR commented 8 years ago

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 8 years ago

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 8 years ago

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.

XhmikosR commented 8 years ago

Bump @imathis

scmbradley commented 8 years ago

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

XhmikosR commented 8 years ago

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

XhmikosR commented 8 years ago

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

parkr commented 8 years ago

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

XhmikosR commented 8 years ago

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 https://github.com/octopress/paginate/issues/19#issuecomment-238647226, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVVtfxi6pOgS7LSDMqa7xlsfI8Ctt9Gks5qeMecgaJpZM4Hq7Lh .

XhmikosR commented 8 years ago

So any news @parkr ?

parkr commented 8 years ago

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