carpentries-incubator / docker-introduction

Reproducible Computational Environments using Containers
https://carpentries-incubator.github.io/docker-introduction/
Other
42 stars 48 forks source link

Jekyll tutorial needs webrick, known Jekyll issue #190

Closed snotskie closed 1 year ago

snotskie commented 1 year ago

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
aturner-epcc commented 1 year ago

@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.