Running into issues building my site locally. Culprit seems to be related jekyll-assets.
When I remove the assets liquid tags from the layout build goes through.
I tried Ruby v. 3-3.2
This is the error:
uvi@MacBook-Pro-2 lp-system % bundle exec jekyll serve --trace
Configuration file: /Users/uvi/git/templates/lp-system/_config.yml
Source: /Users/uvi/git/templates/lp-system
Destination: /Users/uvi/git/templates/lp-system/_site
Incremental build: disabled. Enable with --incremental
Generating…
Jekyll Feed: Generating feed for posts
Liquid Exception: wrong number of arguments (given 2, expected 1) in /Users/uvi/git/templates/lp-system/_layouts/default.html
bundler: failed to load command: jekyll (/Users/uvi/.asdf/installs/ruby/3.0.0/bin/jekyll)
/Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/sprockets-4.2.1/lib/sprockets/resolve.rb:46:in resolve!': wrong number of arguments (given 2, expected 1) (ArgumentError) from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/sprockets-4.2.1/lib/sprockets/base.rb:126:in find_asset!’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/jekyll-assets-056d2c88719e/lib/jekyll/assets/patches/cached_environment.rb:37:in block (2 levels) in <module:CachedEnvironment>' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/jekyll-assets-056d2c88719e/lib/jekyll/assets/plugins/srcmap/css.rb:13:in block in module:Plugins’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/jekyll-assets-056d2c88719e/lib/jekyll/assets/compressors/sassc.rb:15:in block in call' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/jekyll-assets-056d2c88719e/lib/jekyll/assets/hook.rb:80:in block in trigger’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/jekyll-assets-056d2c88719e/lib/jekyll/assets/hook.rb:80:in map' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/jekyll-assets-056d2c88719e/lib/jekyll/assets/hook.rb:80:in trigger’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/jekyll-assets-056d2c88719e/lib/jekyll/assets/compressors/sassc.rb:12:in call' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/sprockets-4.2.1/lib/sprockets/sassc_compressor.rb:27:in call’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/sprockets-4.2.1/lib/sprockets/processor_utils.rb:84:in call_processor' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/sprockets-4.2.1/lib/sprockets/processor_utils.rb:66:in block in call_processors’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/sprockets-4.2.1/lib/sprockets/processor_utils.rb:65:in reverse_each' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/sprockets-4.2.1/lib/sprockets/processor_utils.rb:65:in call_processors’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/sprockets-4.2.1/lib/sprockets/loader.rb:184:in load_from_unloaded' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/sprockets-4.2.1/lib/sprockets/loader.rb:59:in block in load’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/sprockets-4.2.1/lib/sprockets/loader.rb:339:in fetch_asset_from_dependency_cache' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/sprockets-4.2.1/lib/sprockets/loader.rb:43:in load’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/sprockets-4.2.1/lib/sprockets/cached_environment.rb:44:in block in load' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/map.rb:207:in block in fetch_or_store’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/map.rb:187:in fetch' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/map.rb:206:in fetch_or_store’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/sprockets-4.2.1/lib/sprockets/cached_environment.rb:44:in load' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/sprockets-4.2.1/lib/sprockets/base.rb:128:in find_asset!’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/jekyll-assets-056d2c88719e/lib/jekyll/assets/patches/cached_environment.rb:37:in block (2 levels) in <module:CachedEnvironment>' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/sprockets-4.2.1/lib/sprockets/environment.rb:35:in find_asset!’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/jekyll-assets-056d2c88719e/lib/jekyll/assets/env.rb:73:in block in find_asset!' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/jekyll-assets-056d2c88719e/lib/jekyll/assets/logger.rb:22:in with_timed_logging’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/jekyll-assets-056d2c88719e/lib/jekyll/assets/env.rb:72:in find_asset!' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/jekyll-assets-056d2c88719e/lib/jekyll/assets/tag.rb:196:in internal’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/jekyll-assets-056d2c88719e/lib/jekyll/assets/tag.rb:66:in render_raw' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/jekyll-assets-056d2c88719e/lib/jekyll/assets/tag.rb:82:in render’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/liquid-4.0.4/lib/liquid/block_body.rb:103:in render_node_to_output' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/liquid-4.0.4/lib/liquid/block_body.rb:91:in render’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/liquid-4.0.4/lib/liquid/template.rb:206:in block in render' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/liquid-4.0.4/lib/liquid/template.rb:240:in with_profiling’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/liquid-4.0.4/lib/liquid/template.rb:205:in render' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/liquid-4.0.4/lib/liquid/template.rb:218:in render!’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/liquid_renderer/file.rb:39:in block (3 levels) in render!' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/liquid_renderer/file.rb:59:in measure_counts’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/liquid_renderer/file.rb:38:in block (2 levels) in render!' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/liquid_renderer/file.rb:63:in measure_bytes’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/liquid_renderer/file.rb:37:in block in render!' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/liquid_renderer/file.rb:70:in measure_time’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/liquid_renderer/file.rb:36:in render!' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:129:in render_liquid’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:192:in render_layout' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:161:in place_in_layouts’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:93:in render_document' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:63:in run’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:572:in render_regenerated' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:564:in block in render_pages’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:563:in each' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:563:in render_pages’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:211:in render' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:80:in process’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:28:in process_site' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:65:in build’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:36:in process' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in block in process_with_graceful_fail’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in each' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in process_with_graceful_fail’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/lib/jekyll/commands/serve.rb:86:in block (2 levels) in init_with_program' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in block in execute’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in each' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in execute’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in go' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in program’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/jekyll-4.3.2/exe/jekyll:15:in <top (required)>' from /Users/uvi/.asdf/installs/ruby/3.0.0/bin/jekyll:23:in load’
from /Users/uvi/.asdf/installs/ruby/3.0.0/bin/jekyll:23:in <top (required)>' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.5.3/lib/bundler/cli/exec.rb:58:in load’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.5.3/lib/bundler/cli/exec.rb:58:in kernel_load' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.5.3/lib/bundler/cli/exec.rb:23:in run’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.5.3/lib/bundler/cli.rb:451:in exec' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.5.3/lib/bundler/vendor/thor/lib/thor/command.rb:28:in run’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.5.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.5.3/lib/bundler/vendor/thor/lib/thor.rb:527:in dispatch’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.5.3/lib/bundler/cli.rb:34:in dispatch' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.5.3/lib/bundler/vendor/thor/lib/thor/base.rb:584:in start’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.5.3/lib/bundler/cli.rb:28:in start' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.5.3/exe/bundle:28:in block in <top (required)>’
from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.5.3/lib/bundler/friendly_errors.rb:117:in with_friendly_errors' from /Users/uvi/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.5.3/exe/bundle:20:in <top (required)>’
from /Users/uvi/.asdf/installs/ruby/3.0.0/bin/bundle:23:in load' from /Users/uvi/.asdf/installs/ruby/3.0.0/bin/bundle:23:in ’
have you tried running the older version of jekyll with the new version of ruby?
I’ve not seen anything like that gem. Other generators may have something more like it though (I’ve not used it so not sure what all it does), Hugo has some abilities to modify images I think. So does Next.js.
As for building the site I would think you should be able to use a docker file with whatever versions you want. But that would depend on whatever your build process is. Might be worth looking into.
I use amplify, works great. I just looked at how it is setup and it seems like the default docker image I am using has multiple versions of ruby and I could tell it to use 2.6.3 by setting rvm to use that, it looks like I did that at come point and then commented it out.
I’m not sure why the default image is so out of date, my guess is if you change to it they will update it and then my site will break too! ha ha.
When you do it this way though you have some control of what you get - you may even be able to install the older versions of ruby without much issue even if it isn’t there.
Here is my amplify.yml file - I am using a custom npm script to do some stuff, where you see the command: npm run deploy you would have bundle execut jekyll build or just jekyll build if that works.