Skip to content

[Bug]: Error: undefined method `excerpt_separator' for #<Jekyll::Page> #9544

Description

@remarkablemark

Operating System

Ubuntu 22.04.3

Ruby Version

ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]

Jekyll Version

jekyll 3.9.4

GitHub Pages Version

github-pages 229

Expected Behavior

I expected my site to be built successfully when I run the following:

bundle exec jekyll build --safe

Current Behavior

I get an error when I have an excerpt in a page: remarkablemark/remarkablemark.github.io#71

jekyll 3.9.4 | Error:  undefined method `excerpt_separator' for #<Jekyll::Page>

Relevant log output

Run bundle exec jekyll build --safe
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
Configuration file: /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/_config.yml
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
            Source: /home/runner/work/remarkablemark.github.io/remarkablemark.github.io
       Destination: /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
       Jekyll Feed: Generating feed for posts
jekyll 3.9.4 | Error:  undefined method `excerpt_separator' for #<Jekyll::Page @name="404.md">

      head, _, tail = doc_content.to_s.partition(doc.excerpt_separator)
                                                    ^^^^^^^^^^^^^^^^^^
/home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:135:in `extract_excerpt': undefined method `excerpt_separator' for #<Jekyll::Page @name="404.md"> (NoMethodError)

      head, _, tail = doc_content.to_s.partition(doc.excerpt_separator)
                                                    ^^^^^^^^^^^^^^^^^^
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:25:in `initialize'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:173:in `new'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:173:in `replace_relative_links_excerpt!'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:[6](https://github.com/remarkablemark/remarkablemark.github.io/actions/runs/7820440961/job/21335167976?pr=71#step:4:7)4:in `replace_relative_links!'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-relative-links-0.[7](https://github.com/remarkablemark/remarkablemark.github.io/actions/runs/7820440961/job/21335167976?pr=71#step:4:8).0/lib/jekyll-relative-links/generator.rb:44:in `block in generate'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:39:in `each'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:39:in `generate'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/site.rb:175:in `block in generate'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/site.rb:173:in `each'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/site.rb:173:in `generate'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/site.rb:70:in `process'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/command.rb:2[8](https://github.com/remarkablemark/remarkablemark.github.io/actions/runs/7820440961/job/21335167976?pr=71#step:4:9):in `process_site'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.[9](https://github.com/remarkablemark/remarkablemark.github.io/actions/runs/7820440961/job/21335167976?pr=71#step:4:10).4/lib/jekyll/commands/build.rb:65:in `build'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/commands/build.rb:36:in `process'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/exe/jekyll:15:in `<top (required)>'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/bin/jekyll:25:in `load'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/bin/jekyll:25:in `<top (required)>'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:[12](https://github.com/remarkablemark/remarkablemark.github.io/actions/runs/7820440961/job/21335167976?pr=71#step:4:13)7:in `invoke_command'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:1[23](https://github.com/remarkablemark/remarkablemark.github.io/actions/runs/7820440961/job/21335167976?pr=71#step:4:24):in `with_friendly_errors'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/bin/bundle:[25](https://github.com/remarkablemark/remarkablemark.github.io/actions/runs/7820440961/job/21335167976?pr=71#step:4:26):in `load'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/bin/bundle:25:in `<main>'
Error: Process completed with exit code 1.

Code Sample

Steps to reproduce issue

Clone repository:

git clone https://github.com/remarkablemark/remarkablemark.github.io.git
cd remarkablemark.github.io

Checkout branch:

git checkout jekyll-error-undefined-method-excerpt_separator

Build site:

bundle exec jekyll build --safe

See remarkablemark/remarkablemark.github.io#71

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions