# Load error: cannot load such file -- webrick

**URL:** <https://talk.jekyllrb.com/t/load-error-cannot-load-such-file-webrick/5417>\
**Category:** Help\
**Created:** [December 29, 2020, 6:47pm UTC](https://talk.jekyllrb.com/t/load-error-cannot-load-such-file-webrick/5417 "2020-12-29T18:47:03Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![xplosionmind](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/xplosionmind/32/4041_2.png) [@xplosionmind](https://talk.jekyllrb.com/u/xplosionmind)\
**Post date:** [December 29, 2020, 6:47pm UTC](https://talk.jekyllrb.com/t/load-error-cannot-load-such-file-webrick/5417/1 "2020-12-29T18:47:03Z")

</div>

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`:

```auto
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>'

```

Thanks in advance, have a nice evening!  
T

---

<div class="post-metadata">

**Author:** ![xplosionmind](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/xplosionmind/32/4041_2.png) [@xplosionmind](https://talk.jekyllrb.com/u/xplosionmind)\
**Post date:** [December 29, 2020, 6:50pm UTC](https://talk.jekyllrb.com/t/load-error-cannot-load-such-file-webrick/5417/2 "2020-12-29T18:50:27Z")

</div>

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:

```auto
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>'

```

---

<div class="post-metadata">

**Author:** ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)\
**Post date:** [December 29, 2020, 8:25pm UTC](https://talk.jekyllrb.com/t/load-error-cannot-load-such-file-webrick/5417/3 "2020-12-29T20:25:09Z")

</div>

There’s a [similar sounding issue about Jekyll and Ruby 3.0](https://github.com/jekyll/jekyll/issues/8523). Does the work-around mentioned there help?

Alternatively, downgrading to [Homebrew’s Ruby@27](https://formulae.brew.sh/formula/ruby@2.7) might be necessary until all the kinks are worked out.

---

<div class="post-metadata">

**Author:** ![xplosionmind](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/xplosionmind/32/4041_2.png) [@xplosionmind](https://talk.jekyllrb.com/u/xplosionmind)\
**Post date:** [December 29, 2020, 9:05pm UTC](https://talk.jekyllrb.com/t/load-error-cannot-load-such-file-webrick/5417/4 "2020-12-29T21:05:20Z")

</div>

The workaround in the issue worked perfectly. Thanks a lot! 🎉

---

<div class="post-metadata">

**Author:** ![kumuditha-udayanga](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/kumuditha-udayanga/32/3639_2.png) [@kumuditha-udayanga](https://talk.jekyllrb.com/u/kumuditha-udayanga)\
**Post date:** [February 5, 2021, 3:40am UTC](https://talk.jekyllrb.com/t/load-error-cannot-load-such-file-webrick/5417/5 "2021-02-05T03:40:41Z")

</div>

It worked, Thanks a lot! 🎉

---

<div class="post-metadata">

**Author:** ![YJPL](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/yjpl/32/1523_2.png) [@YJPL](https://talk.jekyllrb.com/u/YJPL)\
**Post date:** [May 5, 2021, 11:16am UTC](https://talk.jekyllrb.com/t/load-error-cannot-load-such-file-webrick/5417/6 "2021-05-05T11:16:51Z")

</div>

Ran into the same issue after reinstalling Jelly on an erased Mac, using Ruby 3.0.1.  
Solved using:

`bundle add webrick`

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [June 1, 2021, 10:06am UTC](https://talk.jekyllrb.com/t/load-error-cannot-load-such-file-webrick/5417/7 "2021-06-01T10:06:13Z")

</div>

I followed the webrick advice here which is covered in a Jekyll GitHub issue linked.

I made a full tutorial for upgrading to Jekyll 3 using this.

[Upgrade to Ruby 3 - tutorial](https://talk.jekyllrb.com/t/upgrade-to-ruby-3-tutorial/6113)

---

<div class="post-metadata">

**Author:** ![Namrajp](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/namrajp/32/3766_2.png) [@Namrajp](https://talk.jekyllrb.com/u/Namrajp)\
**Post date:** [July 31, 2021, 6:48am UTC](https://talk.jekyllrb.com/t/load-error-cannot-load-such-file-webrick/5417/8 "2021-07-31T06:48:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![the-bug-finder](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/the-bug-finder/32/3977_2.png) [@the-bug-finder](https://talk.jekyllrb.com/u/the-bug-finder)\
**Post date:** [October 6, 2021, 9:24am UTC](https://talk.jekyllrb.com/t/load-error-cannot-load-such-file-webrick/5417/9 "2021-10-06T09:24:53Z")

</div>

This solution solved my error

---

<div class="post-metadata">

**Author:** ![sriveravi](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/sriveravi/32/4122_2.png) [@sriveravi](https://talk.jekyllrb.com/u/sriveravi)\
**Post date:** [November 21, 2021, 2:31pm UTC](https://talk.jekyllrb.com/t/load-error-cannot-load-such-file-webrick/5417/10 "2021-11-21T14:31:30Z")

</div>

This is the solution. No need to downgrade.

---

<div class="post-metadata">

**Author:** ![maksimluzik](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/maksimluzik/32/4223_2.png) [@maksimluzik](https://talk.jekyllrb.com/u/maksimluzik)\
**Post date:** [December 29, 2021, 12:52pm UTC](https://talk.jekyllrb.com/t/load-error-cannot-load-such-file-webrick/5417/11 "2021-12-29T12:52:28Z")

</div>

Thanks, this is the correct solution

---

<div class="post-metadata">

**Author:** ![AdrianDDS](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/adriandds/32/4321_2.png) [@AdrianDDS](https://talk.jekyllrb.com/u/AdrianDDS)\
**Post date:** [February 8, 2022, 9:55am UTC](https://talk.jekyllrb.com/t/load-error-cannot-load-such-file-webrick/5417/12 "2022-02-08T09:55:31Z")

</div>

This worked perfectly! Thanks!

---

<div class="post-metadata">

**Author:** ![Vertaxxxxx](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/vertaxxxxx/32/4443_2.png) [@Vertaxxxxx](https://talk.jekyllrb.com/u/Vertaxxxxx)\
**Post date:** [March 17, 2022, 9:27am UTC](https://talk.jekyllrb.com/t/load-error-cannot-load-such-file-webrick/5417/13 "2022-03-17T09:27:33Z")

</div>

thanks a lot!!!  
this is definitely the correct answer, no need to downgrade!

---

<div class="post-metadata">

**Author:** ![SrlLiu](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/srlliu/32/4755_2.png) [@SrlLiu](https://talk.jekyllrb.com/u/SrlLiu)\
**Post date:** [July 17, 2022, 4:27pm UTC](https://talk.jekyllrb.com/t/load-error-cannot-load-such-file-webrick/5417/14 "2022-07-17T16:27:25Z")

</div>

I followed this advice that could resolve the “Load error” issue
