paulrobertlloyd / jekyll-figure

A liquid tag for Jekyll that generates <figure> elements
MIT License
52 stars 7 forks source link

Liquid Exception: undefined method `cache_dir' #8

Closed CraigChamberlain closed 4 years ago

CraigChamberlain commented 4 years ago

Running into exceptions on first use of plugin.

Spent a long time trying to get imagemagik installed before giving up and attempting to use the docker image, jekyll/jekyll.

Has anyone experience of this error?

bundle exec jekyll build --trace

  Liquid Exception: undefined method `cache_dir' for #<Jekyll::Site:0x0000556f88257d38> in /_layouts/collection.html
bundler: failed to load command: jekyll (/usr/gem/bin/jekyll)
NoMethodError: undefined method `cache_dir' for #<Jekyll::Site:0x0000556f88257d38>
  /usr/gem/gems/jekyll_picture_tag-1.12.0/lib/jekyll_picture_tag/cache/base.rb:43:in `base_directory'
  /usr/gem/gems/jekyll_picture_tag-1.12.0/lib/jekyll_picture_tag/cache/base.rb:55:in `filename'
  /usr/gem/gems/jekyll_picture_tag-1.12.0/lib/jekyll_picture_tag/cache/base.rb:33:in `data'
  /usr/gem/gems/jekyll_picture_tag-1.12.0/lib/jekyll_picture_tag/cache/base.rb:12:in `[]'
  /usr/gem/gems/jekyll_picture_tag-1.12.0/lib/jekyll_picture_tag/source_image.rb:71:in `check_cache'
  /usr/gem/gems/jekyll_picture_tag-1.12.0/lib/jekyll_picture_tag/source_image.rb:17:in `initialize'
  /usr/gem/gems/jekyll_picture_tag-1.12.0/lib/jekyll_picture_tag/instructions/set.rb:63:in `new'
  /usr/gem/gems/jekyll_picture_tag-1.12.0/lib/jekyll_picture_tag/instructions/set.rb:63:in `build_source_images'
  /usr/gem/gems/jekyll_picture_tag-1.12.0/lib/jekyll_picture_tag/instructions/set.rb:34:in `source_images'
  /usr/gem/gems/jekyll_picture_tag-1.12.0/lib/jekyll_picture_tag/router.rb:48:in `source_images'
  /usr/gem/gems/jekyll_picture_tag-1.12.0/lib/jekyll_picture_tag/utils.rb:51:in `count_srcsets'
  /usr/gem/gems/jekyll_picture_tag-1.12.0/lib/jekyll_picture_tag/output_formats/auto.rb:7:in `new'
  /usr/gem/gems/jekyll_picture_tag-1.12.0/lib/jekyll_picture_tag.rb:68:in `render'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/block_body.rb:103:in `render_node_to_output'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/block_body.rb:91:in `render'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/tags/for.rb:160:in `block (2 levels) in render_segment'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/tags/for.rb:158:in `each'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/tags/for.rb:158:in `block in render_segment'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/context.rb:123:in `stack'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/tags/for.rb:150:in `render_segment'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/tags/for.rb:79:in `render'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/block_body.rb:103:in `render_node_to_output'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/block_body.rb:82:in `render'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/template.rb:208:in `block in render'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/template.rb:242:in `with_profiling'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/template.rb:207:in `render'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/template.rb:220:in `render!'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/liquid_renderer/file.rb:30:in `block (2 levels) in render!'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/liquid_renderer/file.rb:42:in `measure_bytes'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/liquid_renderer/file.rb:29:in `block in render!'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/liquid_renderer/file.rb:49:in `measure_time'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/liquid_renderer/file.rb:28:in `render!'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/tags/include.rb:140:in `block in render'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/context.rb:123:in `stack'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/tags/include.rb:137:in `render'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/block_body.rb:103:in `render_node_to_output'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/block_body.rb:91:in `render'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/template.rb:208:in `block in render'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/template.rb:242:in `with_profiling'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/template.rb:207:in `render'
  /usr/gem/gems/liquid-4.0.3/lib/liquid/template.rb:220:in `render!'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/liquid_renderer/file.rb:30:in `block (2 levels) in render!'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/liquid_renderer/file.rb:42:in `measure_bytes'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/liquid_renderer/file.rb:29:in `block in render!'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/liquid_renderer/file.rb:49:in `measure_time'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/liquid_renderer/file.rb:28:in `render!'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/renderer.rb:126:in `render_liquid'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/renderer.rb:195:in `render_layout'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/renderer.rb:158:in `place_in_layouts'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/renderer.rb:88:in `render_document'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/renderer.rb:62:in `run'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/site.rb:479:in `render_regenerated'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/site.rb:464:in `block (2 levels) in render_docs'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/site.rb:463:in `each'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/site.rb:463:in `block in render_docs'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/site.rb:462:in `each_value'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/site.rb:462:in `render_docs'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/site.rb:191:in `render'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/site.rb:71:in `process'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/command.rb:28:in `process_site'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/commands/build.rb:65:in `build'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/commands/build.rb:36:in `process'
  /usr/gem/gems/jekyll-3.8.7/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
  /usr/gem/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
  /usr/gem/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
  /usr/gem/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
  /usr/gem/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
  /usr/gem/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
  /usr/gem/gems/jekyll-3.8.7/exe/jekyll:15:in `<top (required)>'
  /usr/gem/bin/jekyll:23:in `load'
  /usr/gem/bin/jekyll:23:in `<top (required)>'
CraigChamberlain commented 4 years ago

Sorry, I am on the wrong repo. My apologies.