Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Liquid Exception: undefined method `absolute?' for nil:NilClass #198

Closed
mmistakes opened this issue Apr 26, 2017 · 1 comment · Fixed by #199
Closed

Liquid Exception: undefined method `absolute?' for nil:NilClass #198

mmistakes opened this issue Apr 26, 2017 · 1 comment · Fixed by #199

Comments

@mmistakes
Copy link

Came across this error testing the latest versions 2.2.1 on a Windows 7 box (2.2.0 works fine). Looks like the problem is in drop.rb

  1. Placed {{ seo }} in _layouts/default.html
  2. bundle exec jekyll build
Liquid Exception: undefined method `absolute?' for nil:NilClass in /_layouts/d
efault.html
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-seo-tag-2.2.1/lib/jekyll-seo-tag/d
rop.rb:208:in `absolute_url?': undefined method `absolute?' for nil:NilClass (No
MethodError)
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-seo-tag-2.2.1/lib/jek
yll-seo-tag/drop.rb:166:in `image'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/drop
s/drop.rb:52:in `public_send'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/drop
s/drop.rb:52:in `[]'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/cont
ext.rb:201:in `lookup_and_evaluate'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/vari
able_lookup.rb:48:in `block in evaluate'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/vari
able_lookup.rb:38:in `each_index'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/vari
able_lookup.rb:38:in `evaluate'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/cont
ext.rb:168:in `evaluate'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/cont
ext.rb:160:in `[]'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/cond
ition.rb:99:in `interpret_condition'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/cond
ition.rb:39:in `evaluate'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/tags
/if.rb:38:in `block (2 levels) in render'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/tags
/if.rb:37:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/tags
/if.rb:37:in `block in render'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/cont
ext.rb:132:in `stack'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/tags
/if.rb:36:in `render'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/bloc
k.rb:151:in `render_token'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/prof
iler/hooks.rb:5:in `block in render_token_with_profiling'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/prof
iler.rb:80:in `profile_token_render'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/prof
iler/hooks.rb:4:in `render_token_with_profiling'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/bloc
k.rb:135:in `block in render_all'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/bloc
k.rb:122:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/bloc
k.rb:122:in `render_all'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/bloc
k.rb:108:in `render'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/temp
late.rb:210:in `block in render'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/temp
late.rb:262:in `with_profiling'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/temp
late.rb:209:in `render'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/temp
late.rb:222:in `render!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-seo-tag-2.2.1/lib/jek
yll-seo-tag.rb:30:in `render'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/bloc
k.rb:151:in `render_token'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/prof
iler/hooks.rb:5:in `block in render_token_with_profiling'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/prof
iler.rb:80:in `profile_token_render'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/prof
iler/hooks.rb:4:in `render_token_with_profiling'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/bloc
k.rb:135:in `block in render_all'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/bloc
k.rb:122:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/bloc
k.rb:122:in `render_all'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/bloc
k.rb:108:in `render'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/temp
late.rb:210:in `block in render'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/temp
late.rb:262:in `with_profiling'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/temp
late.rb:209:in `render'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/temp
late.rb:222:in `render!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/liqu
id_renderer/file.rb:28:in `block (2 levels) in render!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/liqu
id_renderer/file.rb:40:in `measure_bytes'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/liqu
id_renderer/file.rb:27:in `block in render!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/liqu
id_renderer/file.rb:47:in `measure_time'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/liqu
id_renderer/file.rb:26:in `render!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/rend
erer.rb:134:in `render_liquid'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/rend
erer.rb:177:in `place_in_layouts'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/rend
erer.rb:91:in `run'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/site
.rb:452:in `block (2 levels) in render_docs'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/site
.rb:450:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/site
.rb:450:in `block in render_docs'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/site
.rb:449:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/site
.rb:449:in `render_docs'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/site
.rb:190:in `render'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/site
.rb:69:in `process'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/comm
and.rb:26:in `process_site'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/comm
ands/build.rb:63:in `build'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/comm
ands/build.rb:34:in `process'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/lib/jekyll/comm
ands/build.rb:16:in `block (2 levels) in init_with_program'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenar
y/command.rb:220:in `call'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenar
y/command.rb:220:in `block in execute'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenar
y/command.rb:220:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenar
y/command.rb:220:in `execute'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenar
y/program.rb:42:in `go'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenar
y.rb:19:in `program'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.4.3/exe/jekyll:13:i
n `<top (required)>'
        from C:/Ruby22-x64/bin/jekyll:22:in `load'
        from C:/Ruby22-x64/bin/jekyll:22:in `<main>'
@benbalter
Copy link
Collaborator

Thanks for catching this @mmistakes. Fix over in #199.

@jekyll jekyll locked and limited conversation to collaborators Apr 30, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants