Hello everybody. After updating to Jekyll 4.2.0, I get the following error, and it seems to have no precedents, here on the forum. Could you be so Kind to help me? (this happens regardless of the website I’m trying to build). Please pardon me if the error is an obvious one but I know nothing about Ruby and Gems…
Everything is up to date (through bundler).
Here’s the log of my build error after entering bundle exec jekyll serve --trace --watch:
bundler: failed to load command: jekyll (/usr/local/lib/ruby/gems/3.0.0/bin/jekyll)
/usr/local/lib/ruby/gems/3.0.0/gems/jekyll-admin-0.11.0/lib/jekyll-admin.rb:12:in `require': cannot load such file -- webrick (LoadError)
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-admin-0.11.0/lib/jekyll-admin.rb:12:in `<top (required)>'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/runtime.rb:66:in `require'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/runtime.rb:66:in `block (2 levels) in require'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/runtime.rb:61:in `each'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/runtime.rb:61:in `block in require'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/runtime.rb:50:in `each'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/runtime.rb:50:in `require'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler.rb:174:in `require'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:53:in `require_from_bundler'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/exe/jekyll:11:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `load'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `<top (required)>'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `load'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `kernel_load'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/cli/exec.rb:28:in `run'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/cli.rb:497:in `exec'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/cli.rb:30:in `dispatch'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/cli.rb:24:in `start'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/exe/bundle:49:in `block in <top (required)>'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/exe/bundle:37:in `<top (required)>'
from /usr/local/opt/ruby/bin/bundle:23:in `load'
from /usr/local/opt/ruby/bin/bundle:23:in `<main>'
a tiny update: it seemed to me from the log that jekyll-admin required some deprecated Gem, but even after removing it, the error seems to be the same. The new log:
bundler: failed to load command: jekyll (/usr/local/lib/ruby/gems/3.0.0/bin/jekyll)
/usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve/servlet.rb:3:in `require': cannot load such file -- webrick (LoadError)
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve/servlet.rb:3:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:179:in `require_relative'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:179:in `setup'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:100:in `process'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
from /usr/local/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `load'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `<top (required)>'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `load'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `kernel_load'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/cli/exec.rb:28:in `run'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/cli.rb:497:in `exec'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/cli.rb:30:in `dispatch'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/cli.rb:24:in `start'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/exe/bundle:49:in `block in <top (required)>'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
from /usr/local/Cellar/ruby/3.0.0_1/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/exe/bundle:37:in `<top (required)>'
from /usr/local/opt/ruby/bin/bundle:23:in `load'
from /usr/local/opt/ruby/bin/bundle:23:in `<main>'
I was in same issue cannot load file - webrick. I tried installing different versions of ruby using rbenv and setting the path multiple times. bundle add webrick worked for me. Thanks.