octopress / paginate

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

undefined method `docs' for nil:NilClass (NoMethodError) #5

Closed t2d closed 9 years ago

t2d commented 9 years ago

I don't really know what else to say

jekyll build --trace
Configuration file: /home/t/website/_config.yml
            Source: ./src
       Destination: /home/t/website/_site
      Generating... 
/var/lib/gems/2.1.0/gems/octopress-paginate-1.1.2/lib/octopress-paginate.rb:139:in `collection': undefined method `docs' for nil:NilClass (NoMethodError)
    from /var/lib/gems/2.1.0/gems/octopress-paginate-1.1.2/lib/octopress-paginate.rb:155:in `page_payload'
    from /var/lib/gems/2.1.0/gems/octopress-paginate-1.1.2/lib/octopress-paginate/hooks.rb:16:in `merge_payload'
    from /var/lib/gems/2.1.0/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:380:in `block in merge_payload'
    from /var/lib/gems/2.1.0/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:379:in `each'
    from /var/lib/gems/2.1.0/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:379:in `merge_payload'
    from /var/lib/gems/2.1.0/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:350:in `do_layout'
    from /usr/lib/ruby/vendor_ruby/jekyll/page.rb:122:in `render'
    from /usr/lib/ruby/vendor_ruby/jekyll/site.rb:261:in `block in render'
    from /usr/lib/ruby/vendor_ruby/jekyll/site.rb:260:in `each'
    from /usr/lib/ruby/vendor_ruby/jekyll/site.rb:260:in `render'
    from /var/lib/gems/2.1.0/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:197:in `render'
    from /usr/lib/ruby/vendor_ruby/jekyll/site.rb:43:in `process'
    from /usr/lib/ruby/vendor_ruby/jekyll/command.rb:53:in `process_site'
    from /usr/lib/ruby/vendor_ruby/jekyll/commands/build.rb:50:in `build'
    from /usr/lib/ruby/vendor_ruby/jekyll/commands/build.rb:33:in `process'
    from /usr/lib/ruby/vendor_ruby/jekyll/commands/build.rb:17:in `block (2 levels) in init_with_program'
    from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in `call'
    from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in `block in execute'
    from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in `each'
    from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in `execute'
    from /usr/lib/ruby/vendor_ruby/mercenary/program.rb:35:in `go'
    from /usr/lib/ruby/vendor_ruby/mercenary.rb:22:in `program'
    from /usr/bin/jekyll:18:in `<main>'
t2d commented 9 years ago

sry, this was caused by old paginator options in my _config.yml. Deleting them solved the problem.

paginate: 5
paginate_path: "/news/page-:num"
eastbaytrafficengineers commented 4 years ago

Same here, except pagination options was in the front matter on a page.