octopress / solarized

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

jekyll serve failing with after following Installation #6

Closed sh78 closed 7 years ago

sh78 commented 8 years ago

Getting deprecation warnings and liquid exceptions after following the "install it yourself" path in solarized/README.md at master · octopress/solarized.

I'm on OS X 10.11.1 (15B42) and use fish shell with ruby 2.2.3p173 via rbenv 2.2.3.

Will gladly provide any additional debugging or info!

Starting from a clean rbenv ruby install with no gems, here's what happens:

1 - install octopress and octopress ink

┌[sean@göz]-(~/tmp)
└> gem install octopress
Fetching: redcarpet-3.3.3.gem (100%)
Building native extensions.  This could take a while...
Successfully installed redcarpet-3.3.3
Fetching: ffi-1.9.10.gem (100%)
Building native extensions.  This could take a while...
Successfully installed ffi-1.9.10
Fetching: rb-inotify-0.9.5.gem (100%)
Successfully installed rb-inotify-0.9.5
Fetching: rb-fsevent-0.9.6.gem (100%)
Successfully installed rb-fsevent-0.9.6
Fetching: listen-3.0.5.gem (100%)
Successfully installed listen-3.0.5
Fetching: jekyll-watch-1.3.0.gem (100%)
Successfully installed jekyll-watch-1.3.0
Fetching: sass-3.4.19.gem (100%)
Successfully installed sass-3.4.19
Fetching: jekyll-sass-converter-1.3.0.gem (100%)
Successfully installed jekyll-sass-converter-1.3.0
Fetching: rouge-1.10.1.gem (100%)
Successfully installed rouge-1.10.1
Fetching: colorator-0.1.gem (100%)
Successfully installed colorator-0.1
Fetching: safe_yaml-1.0.4.gem (100%)
Successfully installed safe_yaml-1.0.4
Fetching: mercenary-0.3.5.gem (100%)
Successfully installed mercenary-0.3.5
Fetching: kramdown-1.9.0.gem (100%)
Successfully installed kramdown-1.9.0
Fetching: liquid-3.0.6.gem (100%)
Successfully installed liquid-3.0.6
Fetching: jekyll-3.0.1.gem (100%)
Successfully installed jekyll-3.0.1
Fetching: octopress-hooks-2.6.1.gem (100%)
Successfully installed octopress-hooks-2.6.1
Fetching: octopress-escape-code-2.0.6.gem (100%)
Successfully installed octopress-escape-code-2.0.6
Fetching: octopress-deploy-1.3.0.gem (100%)
Successfully installed octopress-deploy-1.3.0
Fetching: titlecase-0.1.1.gem (100%)
Successfully installed titlecase-0.1.1
Fetching: octopress-3.0.11.gem (100%)
Successfully installed octopress-3.0.11
20 gems installed

┌[sean@göz]-(~/tmp)
└> gem install octopress-ink
Fetching: execjs-2.6.0.gem (100%)
Successfully installed execjs-2.6.0
Fetching: autoprefixer-rails-2.2.0.20140804.gem (100%)
Successfully installed autoprefixer-rails-2.2.0.20140804
Fetching: octopress-autoprefixer-1.0.1.gem (100%)
Successfully installed octopress-autoprefixer-1.0.1
Fetching: octopress-date-format-3.0.3.gem (100%)
Successfully installed octopress-date-format-3.0.3
Fetching: rubypants-unicode-0.2.5.gem (100%)
Successfully installed rubypants-unicode-0.2.5
Fetching: octopress-filters-1.4.0.gem (100%)
Successfully installed octopress-filters-1.4.0
Fetching: octopress-tag-helpers-1.0.8.gem (100%)
Successfully installed octopress-tag-helpers-1.0.8
Fetching: octopress-include-tag-1.1.3.gem (100%)
Successfully installed octopress-include-tag-1.1.3
Fetching: uglifier-2.7.2.gem (100%)
Successfully installed uglifier-2.7.2
Fetching: octopress-ink-1.2.1.gem (100%)
Successfully installed octopress-ink-1.2.1
10 gems installed

2 - use octopress to create a new site per the docs

┌[sean@göz]-(~/tmp)
└> octopress new test-site
New jekyll site installed in /Users/sean/tmp/test-site.
Added Octopress scaffold:
 + _templates/
 +   draft
 +   page
 +   post

┌[sean@göz]-(~/tmp)
└> cd test-site/

3 - serve the site locally. everything works and looks great.

┌[sean@göz]-(~/t/test-site)
└> jekyll serve
Configuration file: /Users/sean/tmp/test-site/_config.yml
            Source: /Users/sean/tmp/test-site
       Destination: /Users/sean/tmp/test-site/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
                    done in 0.3 seconds.
 Auto-regeneration: enabled for '/Users/sean/tmp/test-site'
Configuration file: /Users/sean/tmp/test-site/_config.yml
    Server address: http://127.0.0.1:4000/
  Server running... press ctrl-c to stop.
^C⏎                                                                            

_4 - install octopress-solarized and add gem to 'config.yml' per the docs

┌[sean@göz]-(~/t/test-site)
└> gem install octopress-solarized
Fetching: octopress-solarized-1.1.2.gem (100%)
Successfully installed octopress-solarized-1.1.2
1 gem installed
┌[sean@göz]-(~/t/test-site)
└> vim _config.yml
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely need to edit after that.
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'jekyll serve'. If you change this file, please restart the server process.

# Site settings
title: Your awesome title
email: your-email@domain.com
description: > # this means to ignore newlines until "baseurl:"
  Write an awesome description for your new site here. You can edit this
  line in _config.yml. It will appear in your document head meta (for
  Google search results) and in your feed.xml site description.
baseurl: "" # the subpath of your site, e.g. /blog
url: "http://yourdomain.com" # the base hostname & protocol for your site
twitter_username: jekyllrb
github_username:  jekyll

# Build settings
markdown: kramdown

gems:
  - octopress-solarized

5 - jekyll serve fails

┌[sean@göz]-(~/t/test-site)
└> jekyll serve
Configuration file: /Users/sean/tmp/test-site/_config.yml
            Source: /Users/sean/tmp/test-site
       Destination: /Users/sean/tmp/test-site/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Deprecation: Collection#empty? should be called on the #docs array directly.
                    Called by /Users/sean/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/octopress-ink-1.2.1/lib/octopress-ink/plugin/bootstrap.rb:163:in `posts?'.
       Deprecation: Collection#select should be called on the #docs array directly.
                    Called by /Users/sean/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/octopress-ink-1.2.1/lib/octopress-ink/plugin/bootstrap.rb:171:in `linkposts?'.
  Liquid Exception: no implicit conversion of nil into String in _posts/2015-12-01-welcome-to-jekyll.markdown
jekyll 3.0.1 | Error:  no implicit conversion of nil into String

_6 - remove the gem lines from 'config.yml', everything works again.

┌[sean@göz]-(~/t/test-site)
└> vim _config.yml

# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely need to edit after that.
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'jekyll serve'. If you change this file, please restart the server process.

# Site settings
title: Your awesome title
email: your-email@domain.com
description: > # this means to ignore newlines until "baseurl:"
  Write an awesome description for your new site here. You can edit this
  line in _config.yml. It will appear in your document head meta (for
  Google search results) and in your feed.xml site description.
baseurl: "" # the subpath of your site, e.g. /blog
url: "http://yourdomain.com" # the base hostname & protocol for your site
twitter_username: jekyllrb
github_username:  jekyll

# Build settings
markdown: kramdown

# gems:
#   - octopress-solarized

┌[sean@göz]-(~/t/test-site)
└> jekyll serve
Configuration file: /Users/sean/tmp/test-site/_config.yml
            Source: /Users/sean/tmp/test-site
       Destination: /Users/sean/tmp/test-site/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
                    done in 0.245 seconds.
 Auto-regeneration: enabled for '/Users/sean/tmp/test-site'
Configuration file: /Users/sean/tmp/test-site/_config.yml
    Server address: http://127.0.0.1:4000/
  Server running... press ctrl-c to stop.
^C⏎                                                                                                    

Just for kicks, I also tried adding {% css_asset_tag %} to the default 'head.html' include that comes with octopress, and got this:

┌[sean@göz]-(~/t/test-site)
└> jekyll serve
Configuration file: /Users/sean/tmp/test-site/_config.yml
            Source: /Users/sean/tmp/test-site
       Destination: /Users/sean/tmp/test-site/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
  Liquid Exception: Liquid syntax error: Unknown tag 'css_asset_tag' in _includes/head.html, included in _layouts/default.html
jekyll 3.0.1 | Error:  Liquid syntax error: Unknown tag 'css_asset_tag'
mholttech commented 8 years ago

I'm having this same issue

ashak commented 8 years ago

Me too

mholttech commented 8 years ago

I ended up going with Hugo for my blog

pama commented 8 years ago

I tried with jekyll 3.0.1 and it doesn't work.

In one of sanitized_path(base_directory, questionable_path) iterations, questionable_path parameter is nill, raising that error. I tried to set it to "" when nil and it works, but I'm not sure about the side effects as I don't understand jekyll and octopress architecture.

I Downgraded jerkyll to 2.5.x and it works as expected.

thuytrinh commented 8 years ago

Any update? I just had this same problem.

dgmstuart commented 8 years ago

Jekyll 3.0.2 has the same issue

parkr commented 8 years ago

Please run bundle exec jekyll build --trace and paste the stacktrace.

dgmstuart commented 8 years ago

@parkr here you go:

Configuration file: /Users/dxwduncan/dev/Personal/blog/_config.yml
            Source: /Users/dxwduncan/dev/Personal/blog
       Destination: /Users/dxwduncan/dev/Personal/blog/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Deprecation: Collection#empty? should be called on the #docs array directly.
                    Called by /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/octopress-ink-1.2.1/lib/octopress-ink/plugin/bootstrap.rb:163:in `p
osts?'.
       Deprecation: Collection#select should be called on the #docs array directly.
                    Called by /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/octopress-ink-1.2.1/lib/octopress-ink/plugin/bootstrap.rb:171:in `linkposts?'.
  Liquid Exception: no implicit conversion of nil into String in _posts/2014-02-07-getting-to-grips-with-postgres.markdown
/usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll.rb:156:in `expand_path': no implicit conversion of nil into String (TypeError)
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll.rb:156:in `sanitized_path'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/site.rb:376:in `block in in_source_dir'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/site.rb:375:in `each'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/site.rb:375:in `reduce'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/site.rb:375:in `in_source_dir'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/liquid_renderer.rb:16:in `file'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/renderer.rb:105:in `render_liquid'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:313:in `render_liquid'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/renderer.rb:60:in `run'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:306:in `run'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/excerpt.rb:76:in `output'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/excerpt.rb:60:in `to_s'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/document.rb:372:in `to_liquid'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/renderer.rb:37:in `run'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:306:in `run'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/site.rb:171:in `block (2 levels) in render'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/site.rb:169:in `each'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/site.rb:169:in `block in render'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/site.rb:168:in `each'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/site.rb:168:in `render'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/octopress-hooks-2.6.1/lib/octopress-hooks.rb:197:in `render'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/site.rb:59:in `process'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/command.rb:28:in `process_site'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/commands/build.rb:60:in `build'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/commands/build.rb:35:in `process'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
        from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-3.0.2/bin/jekyll:17:in `<top (required)>'
        from /usr/local/var/rbenv/versions/2.2.3/bin/jekyll:23:in `load'
        from /usr/local/var/rbenv/versions/2.2.3/bin/jekyll:23:in `<main>'
dgmstuart commented 7 years ago

Looks like this has been addressed: I've tried on Jekyll 3.4.3 and I don't get the errors when running build or serve

parkr commented 7 years ago

:tada: Thanks!