Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when using jekyll doctor #184

Closed
hacketiwack opened this issue Oct 27, 2023 · 2 comments
Closed

Crash when using jekyll doctor #184

hacketiwack opened this issue Oct 27, 2023 · 2 comments

Comments

@hacketiwack
Copy link
Contributor

Current situation
When using the command jekyll doctor on a Jekyll instance with the polyglot plugin, the process crashes and the following error is displayed:

Configuration file: <redacted>/_config.yml
jekyll 4.3.2 | Error:  undefined method `each' for nil:NilClass
/opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-polyglot-1.6.0/lib/jekyll/polyglot/patches/jekyll/site.rb:171:in `document_url_regex': undefined method `each' for nil:NilClass (NoMethodError)

      @languages.each do |lang|
                ^^^^^
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-polyglot-1.6.0/lib/jekyll/polyglot/patches/jekyll/site.rb:127:in `coordinate_documents'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-polyglot-1.6.0/lib/jekyll/polyglot/hooks/coordinate.rb:20:in `block in hook_coordinate'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-polyglot-1.6.0/lib/jekyll/polyglot/hooks/coordinate.rb:19:in `each'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-polyglot-1.6.0/lib/jekyll/polyglot/hooks/coordinate.rb:19:in `hook_coordinate'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-polyglot-1.6.0/lib/jekyll/polyglot/hooks/coordinate.rb:4:in `block in <top (required)>'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-4.3.2/lib/jekyll/hooks.rb:103:in `block in trigger'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-4.3.2/lib/jekyll/hooks.rb:102:in `each'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-4.3.2/lib/jekyll/hooks.rb:102:in `trigger'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:183:in `read'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-4.3.2/lib/jekyll/commands/doctor.rb:25:in `process'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-4.3.2/lib/jekyll/commands/doctor.rb:17:in `block (2 levels) in init_with_program'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/jekyll-4.3.2/exe/jekyll:15:in `<top (required)>'
        from /opt/homebrew/lib/ruby/gems/3.2.0/bin/jekyll:25:in `load'
        from /opt/homebrew/lib/ruby/gems/3.2.0/bin/jekyll:25:in `<top (required)>'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:58:in `load'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:58:in `kernel_load'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler/cli/exec.rb:23:in `run'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler/cli.rb:492:in `exec'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler/cli.rb:34:in `dispatch'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler/cli.rb:28:in `start'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/exe/bundle:37:in `block in <top (required)>'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
        from /opt/homebrew/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/exe/bundle:29:in `<top (required)>'
        from /opt/homebrew/opt/ruby/bin/bundle:25:in `load'
        from /opt/homebrew/opt/ruby/bin/bundle:25:in `<main>'
@untra untra mentioned this issue Oct 29, 2023
8 tasks
@untra
Copy link
Owner

untra commented Oct 30, 2023

This bug should be addressed in jekyll-polyglot 1.7.0 . Please let me know if this is still a problem 👍

@hacketiwack
Copy link
Contributor Author

I just tested it right now. From my point of view, the issue has been fixed.
Thanks a lot.

@untra untra closed this as completed Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants