2

Fresh installation of Jekyll and Octopress. On starting the server, it yields:

Homes-MacBook-Pro:octopress home$ jekyll serve
Configuration file: /Users/home/octopress/_config.yml
        Source: source
        Destination: public
Generating... error: wrong number of arguments (1 for 2). Use --trace to view backtrace

on performing the trace:

Homes-MacBook-Pro:octopress home$ jekyll serve --trace
Configuration file: /Users/home/octopress/_config.yml
        Source: source
   Destination: public
  Generating... /Users/home/octopress/plugins/pagination.rb:72:in `pagination_enabled?': wrong number of arguments (1 for 2) (ArgumentError)
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.4.1/lib/jekyll/generators/pagination.rb:16:in `generate'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.4.1/lib/jekyll/site.rb:227:in `block in generate'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.4.1/lib/jekyll/site.rb:226:in `each'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.4.1/lib/jekyll/site.rb:226:in `generate'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.4.1/lib/jekyll/site.rb:38:in `process'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.4.1/lib/jekyll/command.rb:18:in `process_site'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.4.1/lib/jekyll/commands/build.rb:23:in `build'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.4.1/lib/jekyll/commands/build.rb:7:in `process'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-1.4.1/bin/jekyll:97:in `block (2 levels) in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/command.rb:155:in `run'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/runner.rb:402:in `run_active_command'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/runner.rb:78:in `run!'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/delegates.rb:7:in `run!'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.1.5/lib/commander/import.rb:10:in `block in <top (required)>'
Homes-MacBook-Pro:octopress home$ 

Any ideas?

Sidharth Raja
  • 307
  • 1
  • 3
  • 10
  • Hi! What's on `/Users/home/octopress/plugins/pagination.rb`, line 72? – Carlos Agarie Dec 22 '13 at 21:43
  • Jekyll 1.1 made some changes to the way it handles Pagination and the Octopress pagination plugin needs to be updated to reflect the changes. I'm encountering the same problem and working on a fork right now to fix this. – Winston Kotzan Dec 23 '13 at 16:45
  • By the way, are you using Haml in your project? I'm still working on figuring out how the pagination.rb file gets called, but I think it has to do with enabling pagination for Haml template pages. Check out my Github issue: https://github.com/imathis/octopress/issues/1445 – Winston Kotzan Dec 23 '13 at 18:20
  • @agarie - I have def self.pagination_enabled?(config, file) on line 72 – Sidharth Raja Jan 01 '14 at 16:59

1 Answers1

6

Jekyll 1.1 introduces a bug fix which breaks the pagination.rb plugin within Octopress. Please see this pull request for a fix: https://github.com/imathis/octopress/pull/1447

In the meantime, you can take the pagination.rb file used in that pull request and overwrite the one in your plugins directory. That should fix the error message you are seeing.

However, I would recommend that instead of calling "jekyll serve", use the rake tasks provided by Octopress. That should fix it as well:

$ rake generate

or

$ rake preview
Winston Kotzan
  • 1,979
  • 20
  • 25
  • I identified my mistake. I was using a combination of 'jekyll serve' and 'rake generate' which is well... stupid. Using 'rake preview' now. – Sidharth Raja Jan 01 '14 at 17:15