Hi, I’m new to Jekyll and Ruby, and I’ve been tasked with redesigning the homepage of my company’s website. However, when I run the command jekyll serve
, I get the following error:
Configuration file: D:/Projects/Web/cottonwood/_config.yml
Source: D:/Projects/Web/cottonwood
Destination: D:/Projects/Web/cottonwood/_site
Incremental build: disabled. Enable with --incremental
Generating...
Pagination: Pagination is enabled, but I couldn't find an index.html page to use as the pagination template. Skipping pagination.
Jekyll Feed: Generating feed for posts
Liquid Exception: undefined method `[]' for nil in sitemap.xml
------------------------------------------------
Jekyll 4.3.4 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/jekyll-last-modified-at-1.3.2/lib/jekyll-last-modified-at/determinator.rb:38:in `last_modified_at_unix': undefined method `[]' for nil (NoMethodError)
Additional Context:
- I’m using Jekyll version 4.3.4, and Ruby version 3.3.0.
- The error is caused by the
jekyll-last-modified-at
plugin (version 1.3.2), specifically within thedeterminator.rb
file. It seems like the plugin is attempting to access a value in anil
object, leading to theNoMethodError
exception. - I’ve also encountered a warning about pagination being enabled but not finding the
index.html
page, which might be related to the issue.
I’ve tried running with --trace
for more details, but the issue persists. Has anyone encountered this problem before? Any help would be appreciated!