Jekyll Fails to Start: Missing webrick #16

Closed
opened 2025-11-20 04:14:55 -05:00 by saavagebueno · 10 comments
Owner

Originally created by @unixgeek on GitHub (Apr 10, 2021).

Hi, I'm running through your Docker course and just happened to stumble upon an issue where jekyll doesn't start as it is missing webrick.

There is a note here that it was removed from the 3.0.0 release. I was able to work around it by adding the dependency to the Gemfile manually, but that is not a real fix and I'm not a Ruby guy or a Docker guy (yet) so not sure where this goes?

Originally created by @unixgeek on GitHub (Apr 10, 2021). Hi, I'm running through your Docker course and just happened to stumble upon an issue where jekyll doesn't start as it is missing webrick. There is a note [here](https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/) that it was removed from the 3.0.0 release. I was able to work around it by adding the dependency to the Gemfile manually, but that is not a real fix and I'm not a Ruby guy or a Docker guy (yet) so not sure where this goes?
Author
Owner

@BretFisher commented on GitHub (Apr 10, 2021):

Thanks. The problem isn't related to this Docker image:

  1. if someone has an existing Jekyll site, they now have to add webrick to their Gemfile manually. This is true for any Jekyll site trying to use Ruby 3.0, which this image now uses.
  2. Jekyll hasn't fixed their templates, which need to add webrick automatically to their generated Gemfile. I think you can find the issue in their repo, as multiple people have reported it, like this one.
@BretFisher commented on GitHub (Apr 10, 2021): Thanks. The problem isn't related to this Docker image: 1. if someone has an existing Jekyll site, they now have to add webrick to their Gemfile manually. This is true for any Jekyll site trying to use Ruby 3.0, which this image now uses. 2. Jekyll hasn't fixed their templates, which need to add webrick automatically to their generated Gemfile. I think you can find the issue in their repo, as multiple people have reported it, like [this one](https://github.com/jekyll/jekyll/issues/8523).
Author
Owner

@unixgeek commented on GitHub (Apr 10, 2021):

I understand. I knew this wasn't an issue for this image, but wanted to give you a heads up in case you didn't know and could maybe have a workaround or post a comment for those that might get stuck during this part of the course.

Great stuff BTW!

@unixgeek commented on GitHub (Apr 10, 2021): I understand. I knew this wasn't an issue for this image, but wanted to give you a heads up in case you didn't know and could maybe have a workaround or post a comment for those that might get stuck during this part of the course. Great stuff BTW!
Author
Owner

@BretFisher commented on GitHub (Apr 11, 2021):

Oh for sure, thanks for the heads up. I should likely update the readme, and leave this issue open until the templates are at least updated.

@BretFisher commented on GitHub (Apr 11, 2021): Oh for sure, thanks for the heads up. I should likely update the readme, and leave this issue open until the templates are at least updated.
Author
Owner

@BretFisher commented on GitHub (Jun 7, 2021):

OK latest versions are now pinned to ruby:2-alpine and updated monthly to latest Ruby 2.x and Jekyll versions.

@BretFisher commented on GitHub (Jun 7, 2021): OK latest versions are now pinned to `ruby:2-alpine` and updated monthly to latest Ruby 2.x and Jekyll versions.
Author
Owner

@dimsumthinking commented on GitHub (Apr 16, 2023):

I know this issue is closed but I'm still seeing the issue - can you be more explicit on what we need to do to the gem file or elsewhere to make the current version work. I'm running the docker image on Apple silicon and see:

internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb:37:in `require': cannot load such file -- webrick (LoadError)

Going through your course now.

Thank you

@dimsumthinking commented on GitHub (Apr 16, 2023): I know this issue is closed but I'm still seeing the issue - can you be more explicit on what we need to do to the gem file or elsewhere to make the current version work. I'm running the docker image on Apple silicon and see: <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- webrick (LoadError) Going through your course now. Thank you
Author
Owner

@BretFisher commented on GitHub (Apr 16, 2023):

@dimsumthinking can you put the exact commands and steps you took to get that error? I don't know how to reproduce it.

@BretFisher commented on GitHub (Apr 16, 2023): @dimsumthinking can you put the exact commands and steps you took to get that error? I don't know how to reproduce it.
Author
Owner

@dimsumthinking commented on GitHub (Apr 16, 2023):

Thank and my apologies for not doing so.

I deleted the Gemfile.lock and ran (I think as per the readme)

docker run -p 4000:4000 -v $(pwd):/site bretfisher/jekyll-serve

The site builds fine but then I see the missing webrick issue and jekyll quits (doesn’t stay up in the serve mode)

internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb:37:in `require': cannot load such file -- webrick (LoadError)

I see this same error when I use the jekyll/jekyll file which I’ve been using. I was hoping to be able to use the serve mode again.

Thank you,

Daniel

On Apr 16, 2023, at 4:58 PM, Bret Fisher @.***> wrote:

@dimsumthinking https://github.com/dimsumthinking can you put the exact commands and steps you took to get that error? I don't know how to reproduce it.


Reply to this email directly, view it on GitHub https://github.com/BretFisher/jekyll-serve/issues/25#issuecomment-1510486294, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC53NAF2NSOQAUZIZ75M4DXBRMOPANCNFSM42W52Z2Q.
You are receiving this because you were mentioned.

@dimsumthinking commented on GitHub (Apr 16, 2023): Thank and my apologies for not doing so. I deleted the Gemfile.lock and ran (I think as per the readme) docker run -p 4000:4000 -v $(pwd):/site bretfisher/jekyll-serve The site builds fine but then I see the missing webrick issue and jekyll quits (doesn’t stay up in the serve mode) <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- webrick (LoadError) I see this same error when I use the jekyll/jekyll file which I’ve been using. I was hoping to be able to use the serve mode again. Thank you, Daniel > On Apr 16, 2023, at 4:58 PM, Bret Fisher ***@***.***> wrote: > > > @dimsumthinking <https://github.com/dimsumthinking> can you put the exact commands and steps you took to get that error? I don't know how to reproduce it. > > — > Reply to this email directly, view it on GitHub <https://github.com/BretFisher/jekyll-serve/issues/25#issuecomment-1510486294>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAC53NAF2NSOQAUZIZ75M4DXBRMOPANCNFSM42W52Z2Q>. > You are receiving this because you were mentioned. >
Author
Owner

@BretFisher commented on GitHub (Apr 17, 2023):

OK I'll take a look, but that command works fine for me in a quick test. I have 5+ courses across 500+ videos so I'm not sure what course, lecture, repo, or directory you're talking about. Any more info you can provide will help me understand the cause of your issue, thanks.

@BretFisher commented on GitHub (Apr 17, 2023): OK I'll take a look, but that command works fine for me in a quick test. I have 5+ courses across 500+ videos so I'm not sure what course, lecture, repo, or directory you're talking about. Any more info you can provide will help me understand the cause of your issue, thanks.
Author
Owner

@dimsumthinking commented on GitHub (Apr 17, 2023):

It’s your docker intro - my goal was when I moved to Apple Silicon I didn’t want to install gems etc. WIth my Intel box everything worked fine but that was also before Ruby revved.

I know other people who use your jekyll-serve successfully so I’m sure the issue is mine - I just thought that that was the point of Docker - that it wouldn’t depend on my Machine config. I’ll keep going through your course.

If it’s helpful - here’s the trace on the webrick error:

internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb:37:in require': cannot load such file -- webrick (LoadError) from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in require'
from /usr/local/bundle/gems/jekyll-4.0.1/lib/jekyll/commands/serve/servlet.rb:3:in <top (required)>' from /usr/local/bundle/gems/jekyll-4.0.1/lib/jekyll/commands/serve.rb:179:in require_relative'
from /usr/local/bundle/gems/jekyll-4.0.1/lib/jekyll/commands/serve.rb:179:in setup' from /usr/local/bundle/gems/jekyll-4.0.1/lib/jekyll/commands/serve.rb:100:in process'
from /usr/local/bundle/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in block in process_with_graceful_fail' from /usr/local/bundle/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in each'
from /usr/local/bundle/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in process_with_graceful_fail' from /usr/local/bundle/gems/jekyll-4.0.1/lib/jekyll/commands/serve.rb:86:in block (2 levels) in init_with_program'
from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in block in execute' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in each'
from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in execute' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in go'
from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary.rb:19:in program' from /usr/local/bundle/gems/jekyll-4.0.1/exe/jekyll:15:in <top (required)>'
from /usr/local/bundle/bin/jekyll:25:in load' from /usr/local/bundle/bin/jekyll:25:in <top (required)>'
from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/cli/exec.rb:58:in load' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/cli/exec.rb:58:in kernel_load'
from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/cli/exec.rb:23:in run' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/cli.rb:492:in exec'
from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/vendor/thor/lib/thor/command.rb:27:in run' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command'
from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/vendor/thor/lib/thor.rb:392:in dispatch' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/cli.rb:34:in dispatch'
from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/vendor/thor/lib/thor/base.rb:485:in start' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/cli.rb:28:in start'
from /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.12/exe/bundle:45:in block in <top (required)>' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/friendly_errors.rb:117:in with_friendly_errors'
from /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.12/exe/bundle:33:in <top (required)>' from /usr/local/bin/bundle:25:in load'
from /usr/local/bin/bundle:25:in `

'

You’ve spent enough time on my issue - I appreciate it and will just use this in non-serve mode

On Apr 17, 2023, at 12:12 AM, Bret Fisher @.***> wrote:

OK I'll take a look, but that command works fine for me in a quick test. I have 5+ courses across 500+ videos so I'm not sure what course, lecture, repo, or directory you're talking about. Any more info you can provide will help me understand the cause of your issue, thanks.


Reply to this email directly, view it on GitHub https://github.com/BretFisher/jekyll-serve/issues/25#issuecomment-1510670901, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC53NERKWT4KSFGD3HJ4VDXBS7LJANCNFSM42W52Z2Q.
You are receiving this because you were mentioned.

@dimsumthinking commented on GitHub (Apr 17, 2023): It’s your docker intro - my goal was when I moved to Apple Silicon I didn’t want to install gems etc. WIth my Intel box everything worked fine but that was also before Ruby revved. I know other people who use your jekyll-serve successfully so I’m sure the issue is mine - I just thought that that was the point of Docker - that it wouldn’t depend on my Machine config. I’ll keep going through your course. If it’s helpful - here’s the trace on the webrick error: <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- webrick (LoadError) from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/bundle/gems/jekyll-4.0.1/lib/jekyll/commands/serve/servlet.rb:3:in `<top (required)>' from /usr/local/bundle/gems/jekyll-4.0.1/lib/jekyll/commands/serve.rb:179:in `require_relative' from /usr/local/bundle/gems/jekyll-4.0.1/lib/jekyll/commands/serve.rb:179:in `setup' from /usr/local/bundle/gems/jekyll-4.0.1/lib/jekyll/commands/serve.rb:100:in `process' from /usr/local/bundle/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail' from /usr/local/bundle/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `each' from /usr/local/bundle/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `process_with_graceful_fail' from /usr/local/bundle/gems/jekyll-4.0.1/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go' from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program' from /usr/local/bundle/gems/jekyll-4.0.1/exe/jekyll:15:in `<top (required)>' from /usr/local/bundle/bin/jekyll:25:in `load' from /usr/local/bundle/bin/jekyll:25:in `<top (required)>' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/cli/exec.rb:58:in `load' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/cli/exec.rb:58:in `kernel_load' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/cli/exec.rb:23:in `run' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/cli.rb:492:in `exec' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/cli.rb:34:in `dispatch' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/cli.rb:28:in `start' from /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.12/exe/bundle:45:in `block in <top (required)>' from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/friendly_errors.rb:117:in `with_friendly_errors' from /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.4.12/exe/bundle:33:in `<top (required)>' from /usr/local/bin/bundle:25:in `load' from /usr/local/bin/bundle:25:in `<main>' You’ve spent enough time on my issue - I appreciate it and will just use this in non-serve mode > On Apr 17, 2023, at 12:12 AM, Bret Fisher ***@***.***> wrote: > > > OK I'll take a look, but that command works fine for me in a quick test. I have 5+ courses across 500+ videos so I'm not sure what course, lecture, repo, or directory you're talking about. Any more info you can provide will help me understand the cause of your issue, thanks. > > — > Reply to this email directly, view it on GitHub <https://github.com/BretFisher/jekyll-serve/issues/25#issuecomment-1510670901>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAC53NERKWT4KSFGD3HJ4VDXBS7LJANCNFSM42W52Z2Q>. > You are receiving this because you were mentioned. >
Author
Owner

@dovry commented on GitHub (Feb 12, 2024):

I fired up my old github jekyll page and encountered this issue

image

following Bret's advice, simply adding
gem "webrick" to the Gemfile, and rerunning the 'serve' container in README fixed it.

image

image

Thanks Bret, for your container. I spent all day trying to setup a jekyll container myself and fighting ruby dependencies.

@dovry commented on GitHub (Feb 12, 2024): I fired up my old github jekyll page and encountered this issue ![image](https://github.com/BretFisher/jekyll-serve/assets/15201298/6c4b8aed-fd70-434c-9a6e-d939fc0732e3) following Bret's advice, simply adding `gem "webrick"` to the Gemfile, and rerunning the 'serve' container in README fixed it. ![image](https://github.com/BretFisher/jekyll-serve/assets/15201298/7aef8c08-6449-418b-b7f7-6f4d0fd0fc56) ![image](https://github.com/BretFisher/jekyll-serve/assets/15201298/d520ce33-4122-4ad2-8901-0b0e4ee44f5a) Thanks Bret, for your container. I spent all day trying to setup a jekyll container myself and fighting ruby dependencies.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jekyll-serve#16