$ bundle exec jekyll build --quiet --future --trace
Error: could not read file <path>: no implicit conversion of Hash into Integer
Note: The site is hosted by GitHub Pages but GitHub does NOT build the site for me. I build the site locally and push the contents of _site/ to a different repo on GitHub.
Configuration:
macOS 10.14.6
Ruby 3.0.2
Jekyll 4.0.0
Post a link to your repo please.
Try comment out custom stuff in your excludes. I found issues before where I had bad configuration and then Jekyll was trying to build a post in a dependency that it should ignore.
Also use --verbose instead of quiet so you can see exactly what Jekyll tried to do before the error happened. Maybe you have a bad YAML set up in config or data or page.
Apply some scientific method to move to a working state or start from a working state
Something in your repo or environment is broke so you gotta experiment to find which file or line is the culprit
You can try moving most of your pages or incudes etc. temporarily outside the repo and see if the error goes away
And then comment out everything or half your config until the error goes away.
Eventually you’ll see hopefully it working and you know what broke.
Or use jekyll new
and make a new project that has no errors and move your content to it gradually until it breaks.
When was the last time your site worked?
Find a commit
git log
git checkout abcd123
The install gems and build.
Go back until it breaks then go forward until it works. You’ll find the exact commit that broke it.
PS if you want to use Jekyll 4 and build to GH Pages, i have a template and demo
Michael, thanks for your suggestions. It’s working now. For some reason, I had switched from Jekyll 4.2.0 to Jekyll 4.0.0. Bad idea, apparently.
https://github.com/chmaynard/Sources.git
1 Like