2

当我为我的新 octopress 博客运行 cmd:bundle exec rake generate时,它总是失败并出现以下异常。

$ be rake generate
## Generating Site with Jekyll
identical source/stylesheets/screen.css
Configuration from /Users/millisami/Code/octopress/_config.yml
Building site: source -> public
/Users/millisami/Code/octopress/plugins/pygments_code.rb:14:in `highlight': undefined method `[]' for nil:NilClass (NoMethodError)
  from /Users/millisami/Code/octopress/plugins/backtick_code_block.rb:37:in `block in render_code_block'
  from /Users/millisami/Code/octopress/plugins/backtick_code_block.rb:13:in `gsub'
  from /Users/millisami/Code/octopress/plugins/backtick_code_block.rb:13:in `render_code_block'
  from /Users/millisami/Code/octopress/plugins/octopress_filters.rb:12:in `pre_filter'
  from /Users/millisami/Code/octopress/plugins/octopress_filters.rb:28:in `pre_render'
  from /Users/millisami/Code/octopress/plugins/post_filters.rb:112:in `block in pre_render'
  from /Users/millisami/Code/octopress/plugins/post_filters.rb:111:in `each'
  from /Users/millisami/Code/octopress/plugins/post_filters.rb:111:in `pre_render'
  from /Users/millisami/Code/octopress/plugins/post_filters.rb:166:in `do_layout'
  from /Users/millisami/Code/octopress/.bundle/gems/jekyll-0.12.1/lib/jekyll/post.rb:195:in `render'
  from /Users/millisami/Code/octopress/.bundle/gems/jekyll-0.12.1/lib/jekyll/site.rb:200:in `block in render'
  from /Users/millisami/Code/octopress/.bundle/gems/jekyll-0.12.1/lib/jekyll/site.rb:199:in `each'
  from /Users/millisami/Code/octopress/.bundle/gems/jekyll-0.12.1/lib/jekyll/site.rb:199:in `render'
  from /Users/millisami/Code/octopress/.bundle/gems/jekyll-0.12.1/lib/jekyll/site.rb:41:in `process'
  from /Users/millisami/Code/octopress/.bundle/gems/jekyll-0.12.1/bin/jekyll:264:in `<top (required)>'
  from /Users/millisami/Code/octopress/.bundle/bin/jekyll:23:in `load'
  from /Users/millisami/Code/octopress/.bundle/bin/jekyll:23:in `<main>'
4

1 回答 1

0

我也收到此错误。然后我发现代码格式不对。在```标签中。

前:

``` 对象
view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
```

后:

``` 对象
view.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
```

然后错误信息消失了,我也不知道为什么

于 2014-01-10T06:28:43.770 回答