mirror of
https://github.com/BretFisher/jekyll-serve.git
synced 2026-07-22 13:53:45 -04:00
Jekyll Fails to Start: Missing webrick #16
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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?
@BretFisher commented on GitHub (Apr 10, 2021):
Thanks. The problem isn't related to this Docker image:
@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!
@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 (Jun 7, 2021):
OK latest versions are now pinned to
ruby:2-alpineand updated monthly to latest Ruby 2.x and Jekyll versions.@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
@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.
@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
@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.
@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:inrequire'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:inrequire_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:inprocess'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:ineach'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:inblock (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:ineach'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:ingo'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:inkernel_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:inexec'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:ininvoke_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:indispatch'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:instart'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:inwith_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:inload'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
@dovry commented on GitHub (Feb 12, 2024):
I fired up my old github jekyll page and encountered this issue
following Bret's advice, simply adding
gem "webrick"to the Gemfile, and rerunning the 'serve' container in README fixed it.Thanks Bret, for your container. I spent all day trying to setup a jekyll container myself and fighting ruby dependencies.