jekyll-assets icon indicating copy to clipboard operation
jekyll-assets copied to clipboard

Liquid Exception: no implicit conversion of Symbol into Integer in /_layouts/default.html

Open jebbench opened this issue 6 years ago • 4 comments
trafficstars

  • [X] I tried updating to the latest version
    • [ ] I can't, there is an issue
    • [ ] This is about an < latest
      • [ ] I understand older versions may be unsupported
  • [ ] I Am on Windows
    • [ ] Ubuntu Bash on Windows
    • [ ] Fedora Bash on Windows
    • [ ] Other Bash on Windows
  • [ ] I Am on Linux
    • [ ] Ubuntu
    • [ ] Fedora
    • [ ] CentOS
    • [ ] Redhat
    • [ ] Debian
  • [ ] I am on macOS 10.13
  • [ ] I am on macOS 10.14
  • [X] I'm on Docker
    • [X] I understand Docker may be unsupported

Description

When running a production build the exception Liquid Exception: no implicit conversion of Symbol into Integer in /_layouts/default.html is thrown.

Removing {% asset "main.css" %} from the layout default.html allows the build to succeed.

If I edit assets/css/main.scss to be an empty file the build still fails.

Adding assets: compression: false to my _config.yml allows the build to succeed.

Output

bundle exec jekyll build --trace -V
...
 Rendering Layout: _posts/2018-07-12-dotnet-core-and-the-generichost.md
     Layout source: site
           Assets:   Searched for, and rendered blog/computer-gaming-orange-51415.jpg in 0.1803162s
           Assets:   Searched for, and rendered .jekyll-cache/assets/proxied/65e85a.jpg in 0.0137458s
           Assets:  {:argv1=>"blog/computer-gaming-orange-51415.jpg", :magick=>{:resize=>"730x451^", :gravity=>"center", :crop=>"730x500+0+0"}, :class=>"blog-image", :integrity=>"sha256-wXCBL9S0U3NshJWwj/rvwhOd18E5OuIarnmXgA+P1Ys=", :crossorigin=>"anonymous", :src=>"/assets/65e85a-b300012fa518c26fff254e51aae3086966e026910e6dbbb7f9898e2d50c1952a.jpg"}
           Assets:  Sprockets Cache miss "file_digest:assets/css/main.scss:1547143165" (313ms)
           Assets:  messaging hooks on after_compression through asset
  Liquid Exception: no implicit conversion of Symbol into Integer in /_layouts/default.html
bundler: failed to load command: jekyll (/usr/local/bundle/bin/jekyll)
TypeError: no implicit conversion of Symbol into Integer
  /usr/local/bundle/gems/jekyll-assets-3.0.12/lib/jekyll/assets/plugins/alternates.rb:67:in `[]'
  /usr/local/bundle/gems/jekyll-assets-3.0.12/lib/jekyll/assets/plugins/alternates.rb:67:in `block in <module:Plugins>'
  /usr/local/bundle/gems/jekyll-assets-3.0.12/lib/jekyll/assets/compressors/scss.rb:13:in `block in call'
  /usr/local/bundle/gems/jekyll-assets-3.0.12/lib/jekyll/assets/hook.rb:100:in `block in trigger'
  /usr/local/bundle/gems/jekyll-assets-3.0.12/lib/jekyll/assets/hook.rb:99:in `map'
  /usr/local/bundle/gems/jekyll-assets-3.0.12/lib/jekyll/assets/hook.rb:99:in `trigger'
  /usr/local/bundle/gems/jekyll-assets-3.0.12/lib/jekyll/assets/compressors/scss.rb:12:in `call'
  /usr/local/bundle/gems/sprockets-3.7.2/lib/sprockets/sass_compressor.rb:28:in `call'
  /usr/local/bundle/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
  /usr/local/bundle/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
  /usr/local/bundle/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
  /usr/local/bundle/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
  /usr/local/bundle/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
  /usr/local/bundle/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
  /usr/local/bundle/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
  /usr/local/bundle/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
  /usr/local/bundle/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
  /usr/local/bundle/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
  /usr/local/bundle/gems/jekyll-assets-3.0.12/lib/jekyll/assets/patches/cached.rb:47:in `find_asset!'
  /usr/local/bundle/gems/jekyll-assets-3.0.12/lib/jekyll/assets/patches/find_asset.rb:9:in `find_asset!'
  /usr/local/bundle/gems/jekyll-assets-3.0.12/lib/jekyll/assets/env.rb:87:in `block in find_asset!'
  /usr/local/bundle/gems/jekyll-assets-3.0.12/lib/jekyll/assets/logger.rb:24:in `with_timed_logging'
  /usr/local/bundle/gems/jekyll-assets-3.0.12/lib/jekyll/assets/env.rb:86:in `find_asset!'
  /usr/local/bundle/gems/jekyll-assets-3.0.12/lib/jekyll/assets/tag.rb:164:in `internal'
  /usr/local/bundle/gems/jekyll-assets-3.0.12/lib/jekyll/assets/tag.rb:58:in `render_raw'
  /usr/local/bundle/gems/jekyll-assets-3.0.12/lib/jekyll/assets/tag.rb:70:in `render'
  /usr/local/bundle/gems/liquid-4.0.1/lib/liquid/block_body.rb:102:in `render_node_to_output'
  /usr/local/bundle/gems/liquid-4.0.1/lib/liquid/block_body.rb:91:in `render'
  /usr/local/bundle/gems/liquid-4.0.1/lib/liquid/template.rb:208:in `block in render'
  /usr/local/bundle/gems/liquid-4.0.1/lib/liquid/template.rb:242:in `with_profiling'
  /usr/local/bundle/gems/liquid-4.0.1/lib/liquid/template.rb:207:in `render'
  /usr/local/bundle/gems/liquid-4.0.1/lib/liquid/template.rb:220:in `render!'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/liquid_renderer/file.rb:30:in `block (2 levels) in render!'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/liquid_renderer/file.rb:42:in `measure_bytes'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/liquid_renderer/file.rb:29:in `block in render!'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/liquid_renderer/file.rb:49:in `measure_time'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/liquid_renderer/file.rb:28:in `render!'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/renderer.rb:126:in `render_liquid'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/renderer.rb:195:in `render_layout'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/renderer.rb:158:in `place_in_layouts'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/renderer.rb:88:in `render_document'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/renderer.rb:62:in `run'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/site.rb:479:in `render_regenerated'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/site.rb:464:in `block (2 levels) in render_docs'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/site.rb:463:in `each'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/site.rb:463:in `block in render_docs'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/site.rb:462:in `each_value'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/site.rb:462:in `render_docs'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/site.rb:191:in `render'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/site.rb:71:in `process'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/command.rb:28:in `process_site'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:65:in `build'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:36:in `process'
  /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
  /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
  /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
  /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
  /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
  /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
  /usr/local/bundle/gems/jekyll-3.8.5/exe/jekyll:15:in `<top (required)>'
  /usr/local/bundle/bin/jekyll:23:in `load'
  /usr/local/bundle/bin/jekyll:23:in `<top (required)>'

jebbench avatar Jan 10 '19 18:01 jebbench

Looks like I got a pretty nasty bug somewhere in alternates.

envygeeks avatar Jan 10 '19 18:01 envygeeks

I had the same problem, it was because I had jquery-rails in my Gemfile

luisenrike avatar Jan 14 '19 19:01 luisenrike

It should be an easy problem to fix, I just haven't had the time to go look at it yet.

envygeeks avatar Jan 14 '19 19:01 envygeeks

I have this problem as well

jeffblake avatar Jan 22 '19 00:01 jeffblake