octopress / paginate

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

Error during build #20

Open arturogh opened 8 years ago

arturogh commented 8 years ago

Hi all, getting this error, not sure what to do.

jekyll build --trace Configuration file: /Users/arturogoicochea/Dropbox (Personal)/designDev/arturogoicochea2016/web/_config.yml Source: /Users/arturogoicochea/Dropbox (Personal)/designDev/arturogoicochea2016/web Destination: /Users/arturogoicochea/Dropbox (Personal)/designDev/arturogoicochea2016/web/_site Generating... /Library/Ruby/Gems/2.0.0/gems/octopress-paginate-1.1.2/lib/octopress-paginate.rb:139:in collection': undefined methoddocs' for nil:NilClass (NoMethodError) from /Library/Ruby/Gems/2.0.0/gems/octopress-paginate-1.1.2/lib/octopress-paginate.rb:54:in add_pages' from /Library/Ruby/Gems/2.0.0/gems/octopress-paginate-1.1.2/lib/octopress-paginate.rb:49:inpaginate' from /Library/Ruby/Gems/2.0.0/gems/octopress-paginate-1.1.2/lib/octopress-paginate/hooks.rb:8:in block in post_read' from /Library/Ruby/Gems/2.0.0/gems/octopress-paginate-1.1.2/lib/octopress-paginate/hooks.rb:7:ineach' from /Library/Ruby/Gems/2.0.0/gems/octopress-paginate-1.1.2/lib/octopress-paginate/hooks.rb:7:in post_read' from /Library/Ruby/Gems/2.0.0/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:184:inblock in read' from /Library/Ruby/Gems/2.0.0/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:183:in each' from /Library/Ruby/Gems/2.0.0/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:183:inread' from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:49:in process' from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/command.rb:28:inprocess_site' from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:56:in build' from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:34:inprocess' from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:18:in block (2 levels) in init_with_program' from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:incall' from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in block in execute' from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:ineach' from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in execute' from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:ingo' from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in program' from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/bin/jekyll:20:in<top (required)>' from /usr/local/bin/jekyll:23:in load' from /usr/local/bin/jekyll:23:in

'

bradonomics commented 8 years ago

Has anyone found a solution to this? I'm getting getting the same error when trying to paginate a collection. When paginating only the _posts directory everything builds fine.

I'm running Jekyll 3.2.1. Here's my build --trace if it's helpful:

$ jekyll build --trace
Configuration file: /home/brad/Projects/jekyll_site/_config.yml
            Source: /home/brad/Projects/jekyll_site
       Destination: /home/brad/Projects/jekyll_site/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
/home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/octopress-paginate-1.2.0/lib/octopress-paginate.rb:140:in `collection': undefined method `docs' for nil:NilClass (NoMethodError)
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/octopress-paginate-1.2.0/lib/octopress-paginate.rb:55:in `add_pages'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/octopress-paginate-1.2.0/lib/octopress-paginate.rb:50:in `paginate'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/octopress-paginate-1.2.0/lib/octopress-paginate/hooks.rb:8:in `block in post_read'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/octopress-paginate-1.2.0/lib/octopress-paginate/hooks.rb:7:in `each'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/octopress-paginate-1.2.0/lib/octopress-paginate/hooks.rb:7:in `post_read'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/octopress-hooks-2.6.2/lib/octopress-hooks.rb:184:in `block in read'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/octopress-hooks-2.6.2/lib/octopress-hooks.rb:183:in `each'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/octopress-hooks-2.6.2/lib/octopress-hooks.rb:183:in `read'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/jekyll-3.2.1/lib/jekyll/site.rb:67:in `process'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/jekyll-3.2.1/lib/jekyll/command.rb:26:in `process_site'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/jekyll-3.2.1/lib/jekyll/commands/build.rb:63:in `build'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/jekyll-3.2.1/lib/jekyll/commands/build.rb:34:in `process'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/jekyll-3.2.1/lib/jekyll/commands/build.rb:16:in `block (2 levels) in init_with_program'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
    from /home/brad/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/jekyll-3.2.1/exe/jekyll:13:in `<top (required)>'
    from /home/brad/.rbenv/versions/2.3.0/bin/jekyll:23:in `load'
    from /home/brad/.rbenv/versions/2.3.0/bin/jekyll:23:in `<main>'
egeis commented 8 years ago

I would get that error on occasionally when I miss configured something in config file.