在服务杰基尔时,参数数量错误(1比2)

时间:2013-12-20 09:23:24

标签: jekyll octopress

Jekyll和Octopress的全新安装。启动服务器时,它会产生:

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

执行追踪:

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$ 

有什么想法吗?

1 个答案:

答案 0 :(得分:6)

Jekyll 1.1引入了一个错误修复程序,打破了Octopress中的pagination.rb插件。请参阅此拉取请求以获取修复:https://github.com/imathis/octopress/pull/1447

在此期间,您可以获取该pull请求中使用的pagination.rb文件,并覆盖plugins目录中的文件。这应该可以解决您看到的错误消息。

但是,我建议不要调用“jekyll serve”,而是使用Octopress提供的rake任务。这也应该解决它:

$ rake generate

$ rake preview