Skip to content

Commit b4e14f1

Browse files
Add 'webrick' gem if website is being built locally
Webrick used to be part of the Ruby standard library in version 2. It was removed in Ruby version 3. Jekyll lists webrick as a dependency. It does not install it by default, however. Jekyll can be used to simply build a website and then a different program can serve it. Webrick is only needed if Jekyll will need to serve files. The command run in the podman container is 'jekyll serve' and will require webrick. As webrick is not needed if Jekyll is only building the website, the gem statement is conditional upon an environment variable set by the podman command.
1 parent b14331e commit b4e14f1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
source 'https://rubygems.org'
22
gem 'github-pages', group: :jekyll_plugins
33
gem 'json', '~> 2.0'
4+
install_if -> { ENV["LOCAL_QUBES_DOCS"] == '1' } do
5+
gem 'webrick'
6+
end

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ clean:
55
$(RM) -r _site
66

77
rootless:
8-
podman run --rm --interactive --tty --publish 4000:4000 --volume .:/srv/jekyll:Z --env JEKYLL_ROOTLESS=1 jekyll/jekyll:pages jekyll serve
8+
podman run --rm --interactive --tty --publish 4000:4000 --volume .:/srv/jekyll:Z --env JEKYLL_ROOTLESS=1 --env LOCAL_QUBES_DOCS=1 jekyll/jekyll:pages jekyll serve
99

1010
.PHONY: all clean rootless

0 commit comments

Comments
 (0)