carpentries-incubator/docker-introduction

Jekyll tutorial needs webrick, known Jekyll issue

snotskie opened this issue · 1 comments

While helping with a workshop, I noticed the Jekyll page has this known issue with Jekyll, which produces this error when trying to serve Jekyll:

require': cannot load such file -- webrick (LoadError)

To fix, the learner who encountered this error and I did this:

  1. Run the container interactively instead, docker run --rm --mount type=bind,source=${PWD},target=/srv/jekyll -p 127.0.0.1:4000:4000 -it jekyll/jekyll:pages sh
  2. Within the container, perform the fix for the issue, bundle add webrick
  3. Then, still within the container, run Jekyll, jekyll serve

@snotskie Thanks for reporting this and suggesting a workaround - I can replicate the issue. Rather than modify the running contianer, I think a better solution is to use a Jekyll contianer image that has been build correctly with compatible components. The problem here is really that the pages version of the Jekyll container image is broken. Having to modify the running container goes against the ethos of using contianers int he first place.

I have tested the jekyll:3 container image and it seems to fix the issue. I will put in a PR to update the episode.