dnewms
February 8, 2024, 8:35pm
1
Hello,
Helping set up academicpages template on GitHub Pages. Everything works on Github, and locally on MacOS. However, trying to get the local dev environment working is proving difficult.
Installed Ruby with RubyInstaller.
Installed bundler.
Installed gems.
Add the tzinfo workaround.
Run bundle exec jekyll serve
end up with the following error:
Configuration file: D:/Users/academicpages.github.io/_config.yml
To use retry middleware with Faraday v2.0+, install faraday-retry
gem
Source: D:/Users/academicpages.github.io
Destination: D:/Users/academicpages.github.io/_site
Incremental build: disabled. Enable with --incremental
GeneratingâŚ
jekyll 3.9.4 | Error: undefined method excerpt_separator' for #<Jekyll::Page @name="404.md"> D:/Users/.local/share/gem/ruby/3.2.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)
^^^^^^^^^^^^^^^^^^
Canât seem to find anyone with a similar error in the academicpages repoâŚ
Any ideas? Thanks.
rdyar
February 8, 2024, 11:07pm
2
are any of the GH issues from you? there are a few from yesterday which is quite a co-incidence:
opened 08:09PM - 07 Feb 24 UTC
### Operating System
Ubuntu 22.04.3
### Ruby Version
ruby 3.1.2p20 (2022-04-1⌠2 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:
```sh
bundle exec jekyll build --safe
```
### Current Behavior
I get an error when I have an `excerpt` in a page: https://github.com/remarkablemark/remarkablemark.github.io/pull/71
```
jekyll 3.9.4 | Error: undefined method `excerpt_separator' for #<Jekyll::Page>
```
### Relevant log output
```shell
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:
```sh
git clone https://github.com/remarkablemark/remarkablemark.github.io.git
cd remarkablemark.github.io
```
Checkout branch:
```sh
git checkout jekyll-error-undefined-method-excerpt_separator
```
Build site:
```sh
bundle exec jekyll build --safe
```
See https://github.com/remarkablemark/remarkablemark.github.io/pull/71
are you using an excerpt separator? what is in the 404.md page? it is referenced in your error but not sure if its the problem or not.
1 Like
dnewms
February 8, 2024, 11:25pm
3
Hmm, no I havenât opened any GitHub issues. Thanks, Iâll track those.
Not using any excerpts. Itâs the default config /n/n.
The 404 also is same as that repo .
rdyar
February 9, 2024, 12:40am
4
read thru this and see if this is your issue.
opened 08:38PM - 22 Nov 16 UTC
closed 02:47PM - 20 Feb 18 UTC
has-pull-request
pinned
excerpt
frozen-due-to-age
<!--
Hi! Thanks for considering to file a bug with Jekyll. Please take the ti⌠me to
answer the basic questions. You can convert `[ ]` into `[x]` to check boxes (or submit
and check.) If there is no need for certain fields like output and redirection, please delete
those headers before submitting. We know not all tickets require those steps.
Otherwise, please try to be as detailed as possible.
If you are unsure this is a bug in Jekyll, or this is a bug caused
by a plugin that isn't directly related to Jekyll, or if this is just
a generic usage question, please consider asking your question at
https://talk.jekyllrb.com where non-bug questions go.
Please make sure to mention an affinity team whose responsibilities
most closely align with your issue.
Thanks!
-->
- [x] I believe this to be a bug, not a question about using Jekyll.
- [ ] I updated to the latest Jekyll (or) if on GitHub Pages to the latest `github-pages`
- [x] I read the CONTRIBUTION file at https://jekyllrb.com/docs/contributing/
- [ ] This is a feature request.
---
- [ ] I am on (or have tested on) ***macOS*** 10+
- [x] I am on (or have tested on) ***Debian/Ubuntu*** GNU/Linux
- [ ] I am on (or have tested on) ***Fedora*** GNU/Linux
- [ ] I am on (or have tested on) ***Arch*** GNU/Linux
- [ ] I am on (or have tested on) ***Other*** GNU/Linux
- [ ] I am on (or have tested on) ***Windows*** 10+
<!--
Other GNU/Linux includes Scientific GNU/Linux, CentOS GNU/Linux, and others.
If you are on a minor sub-distro (such as ElementaryOS which does not diverge from
Ubuntu much, please check the parent distro. Kubuntu, Edubuntu, Lubuntu should
also be flagged as Ubuntu as their packages come from upstream Ubuntu.
-->
---
- [ ] I was trying to install.
- [ ] There is a broken Plugin API.
- [ ] I had an error on GitHub Pages, and I have reproduced it locally.
- [ ] I had an error on GitHub Pages, and GitHub Support said it was a Jekyll Bug.
- [ ] I had an error on GitHub Pages and I did not test it locally.
- [x] I was trying to build.
- [ ] It was another bug.
## My Reproduction Steps
<!--
If this error occured on GitHub Pages, please try to provide us with logs,
and look at them yourself, to determine if this is an actual Jekyll bug. In
the event you are unsure, file a ticket, however, when you do please provide
the logs (strip them of personal information.)
If you have trouble finding your logs, please email support@github.com and
they will happily help you. If you cannot find logs, please try your best to
replicate it locally because we cannot fix a problem if we do not know
exactly what caused it, or within a relatively close distance.
-->
<!--
Insert the steps you took to for this problem to exist. Such as the
directories you created and, the full command you ran, and include any
plugins you have installed, this is very important.
If your steps are complicated, you can also submit a GitHub
repository (please no zips, they will be removed and rejected by maintainers,)
and just supply a command for us to reproduce it ourselves.
-->
1. Create a default Jekyll site with `jekyll new jekyll-issue`
2. `cd jekyll-issue`
3. Edit `_posts/YYYY-MM-DD-welcome-to-jekyll.markdown`:
- NOTE: Leave the YAML front matter untouched
- Remove all Markdown content before the Ruby code sample
- Insert an empty line somewhere in the middle of the Ruby code sample
4. Run `jekyll build`
- `jekyll build` exits with error "Liquid Exception: undefined method `t' for nil:NilClass in _posts/YYYY-MM-DD-welcome-to-jekyll.markdown/#excerpt"
## The Output I Wanted
<!--
Insert the output from the command. Alter it as little as you can.
The minimum should be personal information. Though we normally don't log
anything like that so there should be no need to alter it.
-->
A **Welcome to Jekyll** post which starts with a Ruby code sample that has empty lines in it for readability.
## Work Around 1
Don't put any empty lines in the code sample.
## Work Around 2
Add some other Markdown content before the before the Ruby code sample (a [Markdown comment](http://stackoverflow.com/a/20885980) works well for this). Note that adding content after the Ruby code sample does not work.
## My System
- Jekyll 3.0.1
- Ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
- Ubuntu 16.04.1
/cc include any Jekyll affinity teams here (see https://teams.jekyllrb.com/ for more info)
1 Like
dnewms
February 9, 2024, 1:21am
5
Thanks @rdyar â from the bug report you found previously, a comment mentioned rolling back Jekyll from 3.9.4 to 3.9.3, which solved the problem.
Appreciate the help greatly.
For others running into issue:
in gem file: âjekyllâ, â=3.9.3â
then
bundle update jekyll
Hi, can you explain the solution a little bit more. I also have the same problem. My gem file setup
source âhttps://rubygems.org â
Hello! This is where you manage which Jekyll version is used to run.
When you want to use a different version, change it below, save the
file and run bundle install
. Run Jekyll with bundle exec
, like so:
bundle exec jekyll serve
This will help ensure the proper Jekyll version is running.
Happy Jekylling!
gem âgithub-pagesâ, group: :jekyll_plugins
If you want to use Jekyll native, uncomment the line below.
To upgrade, run bundle update
.
gem âjekyllâ
gem âwdmâ, â~> 0.1.0â if Gem.win_platform?
If you have any plugins, put them here!
group :jekyll_plugins do
gem âjekyll-archivesâ
gem âjekyll-feedâ
gem âjekyll-sitemapâ
gem âhawkinsâ
end
dnewms
February 13, 2024, 4:13pm
7
Hi @sayansarkarnitdgp â
It appears it was a larger bug within Jekyll itself, and the revised code is propagating. I imagine the GitHub-pages version will be updated soon, so we shouldnât have an issue for much longer.
This thread: [Bug]: Error: undefined method `excerpt_separator' for #<Jekyll::Page> ¡ Issue #9544 ¡ jekyll/jekyll ¡ GitHub
also contains a handful of other immediate workarounds.
It turns out while the one I posted above might work locally, GitHub Pages would reject it as it wants Jekyll 3.9.4.
So, technically you are suggesting to wait a few days more. Within that time, GitHub will fix the bug, and thereafter, we can start compilation.
dnewms
February 13, 2024, 4:45pm
9
Yes, thatâs what Iâm hoping.
Depending on the theme you are using, Iâve read success of deleting all âexcerptsâ from the front matter across all pages.
dnewms
February 15, 2024, 2:06pm
10
Hi @sayansarkarnitdgp ,
Looks like the jekyll/github community got out a fix. Delete your gemfile.lock, run bundle update
then bundle install
, and that should update the GitHub-pages gem to 231 and build exec serve jekyll
should run successfully again.
In my case, it was compiled automatically without implementing any of your suggestions. Quite strange to me.