Jekyll may not run on Arch Linux because of an error with
webrick. This is caused because webrick is not yet compatible with latest version of Ruby (3.0.1).
This is the relevant line from error output.
require: cannot load such file – webrick (LoadError)
While setting up my GitHub pages blog, I faced this issue. I’ll quickly document how to fix this.
You will need to have
rubygems installed for this.
sudo pacman -S rubygems
bundle via gem.
gem install bundle
Gem will print a warning about not having the local binary folder in your path. Add the following line to your
~/.zshrc depending on the shell you use.
Make sure you replace “3.0.0” with the version number gem reports.
We need to remove the latest Ruby version.
sudo pacman -Rns ruby rubygems
Install Ruby 2.7
Webrick is compatible with Ruby 2.7. This is the version we will install.
sudo pacman -S ruby2.7
bundle will call the binary at
/usr/bin/ruby. However, the old Ruby version is installed at
/usr/bin/ruby-2.7. So we will create a symlink. You will need to uninstall
ruby as I said earlier.
sudo ln -s /usr/bin/ruby-2.7 /usr/bin/ruby
/usr/bin/ruby will just be a symlink (or shortcut in layman terms) to
Go to your Jekyll project directory. Install the dependencies.
Then launch your Jekyll site
bundle exec jekyll serve
Your website should be now live! 🚀
You can receive latest updates from this blog as an RSS feed. See Follow this blog via RSS.
Follow me on GitHub : flyingcakes85