From b4e14f16b08a41fa18135f5bed0fbc4730f700a4 Mon Sep 17 00:00:00 2001 From: NitrogenPointBlue Date: Thu, 16 Nov 2023 11:02:20 -0500 Subject: [PATCH] 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. --- Gemfile | 3 +++ Makefile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index a40567be..21b49425 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,6 @@ source 'https://rubygems.org' gem 'github-pages', group: :jekyll_plugins gem 'json', '~> 2.0' +install_if -> { ENV["LOCAL_QUBES_DOCS"] == '1' } do + gem 'webrick' +end diff --git a/Makefile b/Makefile index c0d9ca27..45e5f547 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,6 @@ clean: $(RM) -r _site rootless: - podman run --rm --interactive --tty --publish 4000:4000 --volume .:/srv/jekyll:Z --env JEKYLL_ROOTLESS=1 jekyll/jekyll:pages jekyll serve + 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 .PHONY: all clean rootless