#186 Jekyll serve command fails on latest jekyll container image
Closed 4 months ago by areguera. Opened 4 months ago by areguera.

Using docker.io/jekyll/jekyll:latest image (sha256:d5ce76846e2c4e037040d093954aae4441eb45e2e2ae4ff84cd7aeca6e694b28) to run the jekyll serve command fails with the following:

/usr/gem/gems/jekyll-4.0.1/lib/jekyll/commands/serve/servlet.rb:3:in `require': cannot load such file -- webrick (LoadError)
        from /usr/gem/gems/jekyll-4.0.1/lib/jekyll/commands/serve/servlet.rb:3:in `<top (required)>'
        from /usr/gem/gems/jekyll-4.0.1/lib/jekyll/commands/serve.rb:179:in `require_relative'
        from /usr/gem/gems/jekyll-4.0.1/lib/jekyll/commands/serve.rb:179:in `setup'
        from /usr/gem/gems/jekyll-4.0.1/lib/jekyll/commands/serve.rb:100:in `process'
        from /usr/gem/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail'
        from /usr/gem/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `each'
        from /usr/gem/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `process_with_graceful_fail'
        from /usr/gem/gems/jekyll-4.0.1/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
        from /usr/gem/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        from /usr/gem/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        from /usr/gem/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        from /usr/gem/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        from /usr/gem/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        from /usr/gem/gems/jekyll-4.0.1/exe/jekyll:15:in `<top (required)>'
        from /usr/local/bundle/bin/jekyll:29:in `load'
        from /usr/local/bundle/bin/jekyll:29:in `<main>'

A related issue report can be found at:
- https://github.com/github/pages-gem/issues/752
- https://github.com/jekyll/jekyll/issues/8523

The jekyll build command seems to work fine, though:

           Writing: /srv/jekyll/_site/news-and-events/summer-dojo/index.html
                    done in 23.654 seconds.
 Auto-regeneration: disabled. Use --watch to enable.

Adding the gem "webrick" dependency to Gemfile solves the jekyll serve command issue.


I confirm it works now with docker.io/jekyll/jekyll:latest (aka "docker.io/jekyll/jekyll@sha256:d5ce76846e2c4e037040d093954aae4441eb45e2e2ae4ff84cd7aeca6e694b28"
)

Metadata Update from @areguera:
- Issue status updated to: Closed (was: Open)

4 months ago

Login to comment on this ticket.

Metadata