Skip to content

document_url_regex': undefined method each' for nil:NilClass (NoMethodError)` with jekyll-polyglot-1.5.0 / jekyll 4.0.1 #151

Closed
@kylekirkby

Description

@kylekirkby

Hi @untra,

As requested :)

We're using a custom docker container we've built for building our multiple Jekyll sites.

This is the entry script in the container where you can see jekyll doctor is being executed prior to building the site.

https://github.com/linaro-its/jekyll-build-container/blob/master/build-site.sh

This is what the build-site.sh script looks like that I'm running below (not to be confused with the build-site.sh entry script 🤦🏼‍♂️

https://github.com/Linaro/website/blob/master/build-site.sh

JEKYLLSITEBUILD="latest" JEKYLL_ACTION=serve JEKYLL_PORT=4000 ./build-site.sh -V --trace -V
Single-repo site - proceeding with normal processing.
Validating source files
Configuration file: /srv/source/_config.yml
Configuration file: /srv/source/_config-production.yml
 Theme Config file: /var/lib/gems/2.7.0/gems/linaro-jekyll-theme-5.0.1/_config.yml
jekyll 4.0.1 | Error:  undefined method `each' for nil:NilClass
Traceback (most recent call last):
        34: from /usr/local/bin/bundle:23:in `<main>'
        33: from /usr/local/bin/bundle:23:in `load'
        32: from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.1.2/libexec/bundle:34:in `<top (required)>'
        31: from /usr/lib/ruby/2.7.0/bundler/friendly_errors.rb:123:in `with_friendly_errors'
        30: from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.1.2/libexec/bundle:46:in `block in <top (required)>'
        29: from /usr/lib/ruby/2.7.0/bundler/cli.rb:24:in `start'
        28: from /usr/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
        27: from /usr/lib/ruby/2.7.0/bundler/cli.rb:30:in `dispatch'
        26: from /usr/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
        25: from /usr/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        24: from /usr/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        23: from /usr/lib/ruby/2.7.0/bundler/cli.rb:476:in `exec'
        22: from /usr/lib/ruby/2.7.0/bundler/cli/exec.rb:28:in `run'
        21: from /usr/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `kernel_load'
        20: from /usr/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `load'
        19: from /usr/local/bin/jekyll:23:in `<top (required)>'
        18: from /usr/local/bin/jekyll:23:in `load'
        17: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/exe/jekyll:15:in `<top (required)>'
        16: from /var/lib/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        15: from /var/lib/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        14: from /var/lib/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        13: from /var/lib/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        12: from /var/lib/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        11: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/commands/doctor.rb:17:in `block (2 levels) in init_with_program'
        10: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/commands/doctor.rb:25:in `process'
         9: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:176:in `read'
         8: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/hooks.rb:101:in `trigger'
         7: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/hooks.rb:101:in `each'
         6: from /var/lib/gems/2.7.0/gems/jekyll-4.0.1/lib/jekyll/hooks.rb:102:in `block in trigger'
         5: from /var/lib/gems/2.7.0/gems/jekyll-polyglot-1.5.0/lib/jekyll/polyglot/hooks/coordinate.rb:4:in `block in <top (required)>'
         4: from /var/lib/gems/2.7.0/gems/jekyll-polyglot-1.5.0/lib/jekyll/polyglot/hooks/coordinate.rb:19:in `hook_coordinate'
         3: from /var/lib/gems/2.7.0/gems/jekyll-polyglot-1.5.0/lib/jekyll/polyglot/hooks/coordinate.rb:19:in `each'
         2: from /var/lib/gems/2.7.0/gems/jekyll-polyglot-1.5.0/lib/jekyll/polyglot/hooks/coordinate.rb:20:in `block in hook_coordinate'
         1: from /var/lib/gems/2.7.0/gems/jekyll-polyglot-1.5.0/lib/jekyll/polyglot/patches/jekyll/site.rb:127:in `coordinate_documents'
/var/lib/gems/2.7.0/gems/jekyll-polyglot-1.5.0/lib/jekyll/polyglot/patches/jekyll/site.rb:171:in `document_url_regex': undefined method `each' for nil:NilClass (NoMethodError)

Hoping you can shed some light on what's going on here 🤞🏼

Cheers!

Kyle

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions