Solution: cannot load such file -- webrick (LoadError)

Nov 03, 2021 · 1 min read · Post a comment
Solution: cannot load such file -- webrick (LoadError)

As a DevOps engineer myself and three years of using a MacBook Pro, I’ve noticed that updating a major release of MacOS always comes with unwelcomed ruby dependencies and version errors.
My first on the list is cannot load such file -- webrick (LoadError). The error occurs usually when trying to execute jekyll serve and the reason for it, is a missing gem, which in this case it’s webrick.


  • Ruby environment


Step 1. Add the missing gem webrick manually using the Ruby Dependency Management called bundle.

$ bundle add webrick


The solution was pretty simple and easy, and if it still doesn’t work for you, please let me know. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.