Local Windows dev environment for GitHub Pages theme


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
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.

are any of the GH issues from you? there are a few from yesterday which is quite a co-incidence:

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

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.

read thru this and see if this is your issue.

1 Like

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”
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’

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.

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.

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.