Operating System
- Archlinux
- custom Docker image
- Also tested on fedora 40
Ruby Version
- arch: ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]
- docker: ruby 3.3.4 (2024-07-09 revision be1089c8ec) [x86_64-linux]
Jekyll Version
both: jekyll 4.3.3
GitHub Pages Version
latest(I don't know)
Expected Behavior
Just trying to start the server using bundle exec jekyll server
Current Behavior
It immediately return some error, the key message should be this:
/home/UserName/.local/share/gem/ruby/3.0.0/gems/jekyll-4.3.3/lib/jekyll.rb:29:in `require': cannot load such file -- json (LoadError)
I have found the solution in #8523
Adding a json gem package with bundle add json.
But why is the user doing this? Isn't it jekyll's job to set dependencies?
I don't know how long this has been going on, but I used a docker image to "fix" it befor:
FROM ruby:3.3-slim-bookworm
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
&& rm -rf /var/lib/apt/lists/*
RUN gem update --system && \
gem install jekyll && \
gem install bundle && \
gem cleanup
The full file of the current commit is here: https://github.com/SourLemonJuice/SourLemonJuice-blog/blob/5fa1bf349e52fcef523d1cfdae6b7351bef14fc4/Dockerfile
That issue is so old and may get a little off-topic, so open a new one (º﹃º )
Relevant log output
$ bundle exec jekyll server
bundler: failed to load command: jekyll (/home/lemon/.local/share/gem/ruby/3.0.0/bin/jekyll)
/home/UserName/.local/share/gem/ruby/3.0.0/gems/jekyll-4.3.3/lib/jekyll.rb:29:in `require': cannot load such file -- json (LoadError)
from /home/lemon/.local/share/gem/ruby/3.0.0/gems/jekyll-4.3.3/lib/jekyll.rb:29:in `<top (required)>'
from /home/UserName/.local/share/gem/ruby/3.0.0/gems/jekyll-4.3.3/exe/jekyll:8:in `require'
from /home/UserName/.local/share/gem/ruby/3.0.0/gems/jekyll-4.3.3/exe/jekyll:8:in `<top (required)>'
from /home/UserName/.local/share/gem/ruby/3.0.0/bin/jekyll:25:in `load'
from /home/UserName/.local/share/gem/ruby/3.0.0/bin/jekyll:25:in `<top (required)>'
from /home/UserName/.local/share/gem/ruby/3.0.0/gems/bundler-2.5.15/lib/bundler/cli/exec.rb:58:in `load'
from /home/UserName/.local/share/gem/ruby/3.0.0/gems/bundler-2.5.15/lib/bundler/cli/exec.rb:58:in `kernel_load'
from /home/UserName/.local/share/gem/ruby/3.0.0/gems/bundler-2.5.15/lib/bundler/cli/exec.rb:23:in `run'
from /home/UserName/.local/share/gem/ruby/3.0.0/gems/bundler-2.5.15/lib/bundler/cli.rb:455:in `exec'
from /home/UserName/.local/share/gem/ruby/3.0.0/gems/bundler-2.5.15/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
from /home/UserName/.local/share/gem/ruby/3.0.0/gems/bundler-2.5.15/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /home/UserName/.local/share/gem/ruby/3.0.0/gems/bundler-2.5.15/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
from /home/UserName/.local/share/gem/ruby/3.0.0/gems/bundler-2.5.15/lib/bundler/cli.rb:35:in `dispatch'
from /home/UserName/.local/share/gem/ruby/3.0.0/gems/bundler-2.5.15/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
from /home/UserName/.local/share/gem/ruby/3.0.0/gems/bundler-2.5.15/lib/bundler/cli.rb:29:in `start'
from /home/UserName/.local/share/gem/ruby/3.0.0/gems/bundler-2.5.15/exe/bundle:28:in `block in <top (required)>'
from /home/UserName/.local/share/gem/ruby/3.0.0/gems/bundler-2.5.15/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
from /home/UserName/.local/share/gem/ruby/3.0.0/gems/bundler-2.5.15/exe/bundle:20:in `<top (required)>'
from /sbin/bundle:25:in `load'
from /sbin/bundle:25:in `<main>'
Code Sample
I don't think only my site having this problem, in my system(Arch) run jekyll new ./ then bundle exec jekyll server will also crash
Operating System
Ruby Version
Jekyll Version
both: jekyll 4.3.3
GitHub Pages Version
latest(I don't know)
Expected Behavior
Just trying to start the server using
bundle exec jekyll serverCurrent Behavior
It immediately return some error, the key message should be this:
I have found the solution in #8523
Adding a
jsongem package withbundle add json.But why is the user doing this? Isn't it jekyll's job to set dependencies?
I don't know how long this has been going on, but I used a docker image to "fix" it befor:
The full file of the current commit is here: https://github.com/SourLemonJuice/SourLemonJuice-blog/blob/5fa1bf349e52fcef523d1cfdae6b7351bef14fc4/Dockerfile
That issue is so old and may get a little off-topic, so open a new one
(º﹃º )Relevant log output
Code Sample
I don't think only my site having this problem, in my system(Arch) run
jekyll new ./thenbundle exec jekyll serverwill also crash