jeffreytse / jekyll-spaceship

🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
MIT License
606 stars 63 forks source link

Media Processor: undefined method `match' for nil:NilClass (NoMethodError) #45

Closed ghost closed 3 years ago

ghost commented 3 years ago

Today I updated jekyll-spaceship from 0.9.2 to 0.9.8. Unfortunately, now my site doesn't compile. Tried with 0.9.7, but the same thing happens.

EDIT: Last working version is 0.9.3.

gem list nokogiri

*** LOCAL GEMS ***

nokogiri (1.11.2 x86_64-darwin, 1.10.10)

Error log:

Traceback (most recent call last):
        54: from /usr/local/opt/ruby@2.7/bin/bundle:23:in `<main>'
        53: from /usr/local/opt/ruby@2.7/bin/bundle:23:in `load'
        52: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
        51: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/2.7.0/bundler/friendly_errors.rb:123:in `with_friendly_errors'
        50: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
        49: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/2.7.0/bundler/cli.rb:24:in `start'
        48: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
        47: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/2.7.0/bundler/cli.rb:30:in `dispatch'
        46: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
        45: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        44: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        43: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/2.7.0/bundler/cli.rb:476:in `exec'
        42: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/2.7.0/bundler/cli/exec.rb:28:in `run'
        41: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `kernel_load'
        40: from /usr/local/Cellar/ruby@2.7/2.7.2/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `load'
        39: from /usr/local/lib/ruby/gems/2.7.0/bin/jekyll:23:in `<top (required)>'
        38: from /usr/local/lib/ruby/gems/2.7.0/bin/jekyll:23:in `load'
        37: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/exe/jekyll:15:in `<top (required)>'
        36: from /usr/local/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
        35: from /usr/local/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
        34: from /usr/local/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
        33: from /usr/local/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
        32: from /usr/local/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
        31: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
        30: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
        29: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/command.rb:91:in `each'
        28: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
        27: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/commands/build.rb:36:in `process'
        26: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/commands/build.rb:65:in `build'
        25: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/command.rb:28:in `process_site'
        24: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/site.rb:80:in `process'
        23: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/site.rb:210:in `render'
        22: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/site.rb:530:in `render_docs'
        21: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/site.rb:530:in `each_value'
        20: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/site.rb:531:in `block in render_docs'
        19: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/site.rb:531:in `each'
        18: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/site.rb:532:in `block (2 levels) in render_docs'
        17: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/site.rb:548:in `render_regenerated'
        16: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/document.rb:392:in `trigger_hooks'
        15: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/hooks.rb:102:in `trigger'
        14: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/hooks.rb:102:in `each'
        13: from /usr/local/lib/ruby/gems/2.7.0/bundler/gems/jekyll-c9c9dc7dac74/lib/jekyll/hooks.rb:103:in `block in trigger'
        12: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/manager.rb:42:in `block in hook'
        11: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/manager.rb:32:in `block in hook'
        10: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/manager.rb:60:in `dispatch'
         9: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/manager.rb:60:in `each'
         8: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/manager.rb:61:in `block in dispatch'
         7: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/cores/processor.rb:132:in `dispatch'
         6: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/processors/media-processor.rb:26:in `on_handle_html'
         5: from /usr/local/lib/ruby/gems/2.7.0/gems/nokogiri-1.11.2-x86_64-darwin/lib/nokogiri/xml/node_set.rb:238:in `each'
         4: from /usr/local/lib/ruby/gems/2.7.0/gems/nokogiri-1.11.2-x86_64-darwin/lib/nokogiri/xml/node_set.rb:238:in `upto'
         3: from /usr/local/lib/ruby/gems/2.7.0/gems/nokogiri-1.11.2-x86_64-darwin/lib/nokogiri/xml/node_set.rb:239:in `block in each'
         2: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/processors/media-processor.rb:27:in `block in on_handle_html'
         1: from /usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/processors/media-processor.rb:42:in `handle_normal_audio'
/usr/local/lib/ruby/gems/2.7.0/gems/jekyll-spaceship-0.9.8/lib/jekyll-spaceship/processors/media-processor.rb:131:in `handle_media': undefined method `match' for nil:NilClass (NoMethodError)

bundle install, if needed

Using public_suffix 4.0.6
Using addressable 2.7.0
Using bundler 2.1.4
Using colorator 1.1.0
Using concurrent-ruby 1.1.8
Using i18n 1.8.9
Using ruby-enum 0.9.0
Using commonmarker 0.21.2
Using eventmachine 1.2.7
Using http_parser.rb 0.6.0
Using em-websocket 0.5.2
Using ffi 1.15.0
Using forwardable-extended 2.6.0
Using gemoji 3.0.1
Using sassc 2.4.0
Using jekyll-sass-converter 2.1.0
Using rb-fsevent 0.10.4
Using rb-inotify 0.10.1
Using listen 3.4.1
Using jekyll-watch 2.2.1
Using rexml 3.2.4
Using kramdown 2.3.1
Using kramdown-parser-gfm 1.1.0
Using liquid 4.0.3
Using mercenary 0.4.0
Using pathutil 0.16.2
Using rouge 3.26.0
Using safe_yaml 1.0.5
Using unicode-display_width 1.7.0
Using terminal-table 2.0.0
Using webrick 1.7.0
Using jekyll 4.2.0 from https://github.com/jekyll/jekyll.git (at master@c9c9dc7)
Using jekyll-commonmark 1.3.1
Using jekyll-contentblocks 1.2.0
Using jekyll-include-cache 0.2.1
Using jekyll-redirect-from 0.16.0
Using jekyll-seo-tag 2.7.1
Using jekyll-sitemap 1.4.0
Using mini_portile2 2.5.0
Using racc 1.5.2
Using nokogiri 1.11.2 (x86_64-darwin)
Using rainbow 3.0.0
Using jekyll-spaceship 0.9.8
Using mime-types-data 3.2021.0225
Using mime-types 3.3.1
Using mini_magick 4.11.0
Using objective_elements 1.1.2
Using jekyll_picture_tag 1.14.0
Using liquid-c 4.0.0
Bundle complete! 12 Gemfile dependencies, 49 gems now installed.
jeffreytse commented 3 years ago

Hi @manz4rk

Could you provide your project source code to me? It's better for me to settle this issue.

Thanks and regards

ghost commented 3 years ago

Sure thing! Stripped the images so don't worry about them. manz4rk_project_code.zip

jeffreytse commented 3 years ago

Hi @manz4rk

Thanks for the reporting and this issue has been address and fixed. Please update your plugin with the repository's master branch in the Gemfile as below snippet.

gem 'jekyll-spaceship', github: 'jeffreytse/jekyll-spaceship'

Welcome to star this project for further udpates in the future. : )

Thanks and regards

ghost commented 3 years ago

Hi there @jeffreytse

Thanks for a quick fix! Unfortunatelly, as I updated the plugin, I noticed that it changes the compiled files layout, for some reason...

image

It gets rid of the tag completely, which is important in my layout. I have confirmed that after regressing to 0.9.3, the changes are not there.

jeffreytse commented 3 years ago

Hi @manz4rk

Thanks for the reporting, this issue has been addressed and fixed on this commit 39cfb51, please update your plugin with the repository's master branch.

Thanks and regards

ghost commented 3 years ago

Amazing, thanks so much! Issue can be closed.