pachun / update_tags

Automatically update your Jekyll blog's tag index pages for GitHub Pages.
MIT License
5 stars 2 forks source link

`update_tags` fails with uninitialized constant error #2

Closed rjoberon closed 2 months ago

rjoberon commented 2 months ago

Calling update_tags results in

Updating tags.../var/lib/gems/3.1.0/gems/front_matter_parser-1.0.1/lib/front_matter_parser/parser.rb:36:in `syntax_parser_from_symbol': uninitialized constant FrontMatterParser::SyntaxParser::Markdown (NameError)

      Kernel.const_get(
            ^^^^^^^^^^
    from /var/lib/gems/3.1.0/gems/front_matter_parser-1.0.1/lib/front_matter_parser/parser.rb:79:in `infer_syntax_parser'
    from /var/lib/gems/3.1.0/gems/front_matter_parser-1.0.1/lib/front_matter_parser/parser.rb:54:in `initialize'
    from /var/lib/gems/3.1.0/gems/front_matter_parser-1.0.1/lib/front_matter_parser/parser.rb:25:in `new'
    from /var/lib/gems/3.1.0/gems/front_matter_parser-1.0.1/lib/front_matter_parser/parser.rb:25:in `block in parse_file'
    from /var/lib/gems/3.1.0/gems/front_matter_parser-1.0.1/lib/front_matter_parser/parser.rb:24:in `open'
    from /var/lib/gems/3.1.0/gems/front_matter_parser-1.0.1/lib/front_matter_parser/parser.rb:24:in `parse_file'
    from /var/lib/gems/3.1.0/gems/update_tags-0.0.1/lib/update_tags.rb:47:in `block in tags'
    from /var/lib/gems/3.1.0/gems/update_tags-0.0.1/lib/update_tags.rb:45:in `each'
    from /var/lib/gems/3.1.0/gems/update_tags-0.0.1/lib/update_tags.rb:45:in `inject'
    from /var/lib/gems/3.1.0/gems/update_tags-0.0.1/lib/update_tags.rb:45:in `tags'
    from /var/lib/gems/3.1.0/gems/update_tags-0.0.1/lib/update_tags.rb:32:in `create_tag_pages'
    from /var/lib/gems/3.1.0/gems/update_tags-0.0.1/lib/update_tags.rb:19:in `update'
    from /var/lib/gems/3.1.0/gems/update_tags-0.0.1/lib/update_tags.rb:6:in `update'
    from /var/lib/gems/3.1.0/gems/update_tags-0.0.1/bin/update_tags:28:in `now'
    from /usr/share/rubygems-integration/all/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
    from /usr/share/rubygems-integration/all/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
    from /usr/share/rubygems-integration/all/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
    from /usr/share/rubygems-integration/all/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
    from /var/lib/gems/3.1.0/gems/update_tags-0.0.1/bin/update_tags:51:in `<top (required)>'
    from /usr/local/bin/update_tags:25:in `load'
    from /usr/local/bin/update_tags:25:in `<main>'

I installed the gem as described:

> gem install update_tags
Fetching update_tags-0.0.1.gem
Fetching filewatcher-2.0.0.gem
Fetching front_matter_parser-1.0.1.gem
Successfully installed front_matter_parser-1.0.1
Successfully installed filewatcher-2.0.0
Successfully installed update_tags-0.0.1
Parsing documentation for front_matter_parser-1.0.1
Installing ri documentation for front_matter_parser-1.0.1
Parsing documentation for filewatcher-2.0.0
Installing ri documentation for filewatcher-2.0.0
Parsing documentation for update_tags-0.0.1
Installing ri documentation for update_tags-0.0.1
Done installing documentation for front_matter_parser, filewatcher, update_tags after 0 seconds
3 gems installed

Any idea how to fix this?

rjoberon commented 2 months ago

This error occurs when the file extension .markdown instead of .md is used. Renaming the files solved the problem.