octopress / solarized

Style code snippets with Ethan Schoonover's Solarized theme (tweaked a bit).
MIT License
10 stars 4 forks source link

undefined method `start_with?' for nil:NilClass when using jekyll 3.1.2 #7

Open octonato opened 8 years ago

octonato commented 8 years ago

Hi,

I'm getting the following error when running this plugin. Here is what I get when I run it in demo folder.

Is there a quick workaround for that?

➜  demo git:(master) pwd
/Users/renato/Sources/tmp/solarized/demo
➜  demo git:(master) jekyll serve --trace
Configuration file: /Users/renato/Sources/tmp/solarized/demo/_config.yml
            Source: /Users/renato/Sources/tmp/solarized/demo
       Destination: /Users/renato/Sources/tmp/solarized/demo/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Deprecation: posts.empty? should be changed to posts.docs.empty?.
                    Called by /usr/local/lib/ruby/gems/2.2.0/gems/octopress-ink-1.2.1/lib/octopress-ink/plugin/bootstrap.rb:163:in `posts?'.
  Liquid Exception: undefined method `start_with?' for nil:NilClass in index.html
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll.rb:156:in `sanitized_path': undefined method `start_with?' for nil:NilClass (NoMethodError)
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/site.rb:355:in `block in in_source_dir'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/site.rb:354:in `each'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/site.rb:354:in `reduce'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/site.rb:354:in `in_source_dir'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/liquid_renderer.rb:16:in `file'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/renderer.rb:106:in `render_liquid'
    from /usr/local/lib/ruby/gems/2.2.0/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:311:in `render_liquid'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/renderer.rb:61:in `run'
    from /usr/local/lib/ruby/gems/2.2.0/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:306:in `run'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/site.rb:179:in `block in render'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/site.rb:177:in `each'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/site.rb:177:in `render'
    from /usr/local/lib/ruby/gems/2.2.0/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:197:in `render'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/site.rb:59:in `process'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/command.rb:26:in `process_site'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/commands/build.rb:60:in `build'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/commands/build.rb:33:in `process'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/commands/serve.rb:34:in `block (2 levels) in init_with_program'
    from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
    from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
    from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
    from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
    from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
    from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/bin/jekyll:13:in `<top (required)>'
    from /usr/local/bin/jekyll:23:in `load'
    from /usr/local/bin/jekyll:23:in `<main>'
octonato commented 8 years ago

I just tried with version 1.1.1 and error disappears.

However, I'm getting now: Liquid Exception: Liquid syntax error (line 8): Unknown tag 'css_asset_tag' in _layouts/default.html

I'm using Jekyll 3.1.2

ashak commented 8 years ago

I get the exact same problem.

scmbradley commented 8 years ago

This issue seems similar to this one: https://github.com/octopress/paginate/issues/19

I also have this issue, too. I'll try deleting stuff from my _config.yml to see what' causing it (since I don't have this issue with a fresh octopress init

scmbradley commented 8 years ago

I get the same error with octopress-codeblock and octopress-codefence