BretFisher/jekyll-serve

Errors with jekyll-serve since 2021-04-09's update to Ruby 3.0

linuxct opened this issue · 3 comments

Hi, as we were discussing in Twitter, here's a detailed error log about the issue we are facing when trying to bring up our Jekyll site since the last update. As you can see in the logs, the server just tries to re-spawn in an apparent endless loop, showing part of the same error messages as in the first execution.

Log: https://del.dog/ewokithifu.txt
Copy of our Gemfile attached. Gemfile.zip
Copy of the resulting Gemfile.lock attached. Gemfile.lock.zip

Copy of the plugins listed in our _config.yml file: https://del.dog/epelusirul.txt

Look likes an error in your dependencies. The only thing that's changed in this image is updating to use the latest ruby, jekyll, and bundler, via the simple Dockerfile. You might need to update your Jekyll, which is now at 4.2, or test with Ruby 3.0, which is now GA :)

Also, this repo is rather simplistic. I don't pin to specific versions, I don't version my docker images in Docker Hub, and I have no CI to validate this solution works on every build.

If you're trying to run production workloads with Jekyll, I recommend using the official jekyll/jekyll image with a versioned image tag, and creating your own CI (GitHub Actions are great) that test runs your Jekyll site whenever you change your Dockerfile FROM version. That way, no change that an upstream image (like mine) makes will accidentally take down your server, as you'll need to manually update your dependencies before any changes happen.

I hope that helps.

I managed to fix the error by replacing the one-gem-to-rule-them-all github-pages with a proper Gemfile containing the necessary gems to run Jekyll just as github-pages would do. The problem was that the github-pages gem was imposing a much lower version of Jekyll (1.x.x), so removing that and specifying Jekyll 4.2+ on the Gemfile did the trick. Also, remember to add 'webrick' as dependency if you run Jekyll 4 on top of Ruby 3.