While trying to change my jekyll theme file by following this guide: https://jekyllrb.com/docs/themes/ I get this error when trying to run bundle exec jekyll serve
bundle exec jekyll serve
Configuration file: C:/womensportcamp.com/_config.yml
Source: C:/womensportcamp.com
Destination: C:/womensportcamp.com/_site
Incremental build: disabled. Enable with --incremental
Generating...
Build Warning: Layout 'post' requested in _posts/2017-09-22-health-benefits-of-yoga.markdown does not exist.
Build Warning: Layout 'post' requested in _posts/2017-09-23-how-to-maintain-a-healthy-heart.markdown does not exist.
Liquid Exception: No such file or directory - git rev-parse HEAD in /_layouts/default.html
jekyll 3.5.2 | Error: No such file or directory - git rev-parse HEAD
not sure if this is it, but did you check those 2 files listed? see if there is a git message in there. I think that if there is a git conflict it will leave a message around the offending area and maybe jekyll is choking on that.
What exactly should I check about those 2 files? I’ve created those while I had the default minima theme installed and all went smooth - the website was running great and I was able to create new posts and edit some configurations. All those issues showed up when I tried to change the theme.
Please treat me as a complete noob in regards to this ruby/gem/git thing and tell me where should I look for this message.
my thought is that you did a git merge of some sort, git had a conflict, and it left a message in one of those files that starts or contains that text, jekyll is seeing it and is saying hey wait - there is no such file called git rev-parse whatever.
just open those files and read them and see if there is something in there probably at the top in the front matter that has that text.
If there is nothing like that in those files try searching the whole repo if you are using sublime do a find in files for git rev-parse and see if it is in a file somewhere.
I’m not saying that this is it, just worth checking. I am no git expert but I think I screwed up once and ended up with something like this.
Ahh… now I too think this could actually be the issue…
@jekyllfreak, Like @rdyar mentioned, you should probably search through all of the files in your project directory, specifically looking for git rev-parse HEAD or at the least HEAD
If your project directory contains a huge number of files, I suggest using an advanced text-editor such as SublimeText or Notepad++ to search through a bunch of files easily…
Also, if you’ve the project repository on GitHub then you can do the search there as well…
I have done a full infile search using Total Commander and searched both my jekyll directory (c:\womensportcamp.com) and the theme gem file location c:\Ruby24-x64\lib\ruby\gems\2.4.0\gems\jekyll-theme-primer-0.5.2\ for strings such as git rev-parse or “rev-parse” and couldn’t find anything. Just to make sure, opened those 2017-09-22-health-benefits-of-yoga.markdown and 2017-09-23-how-to-maintain-a-healthy-heart.markdown manually and everything seems to be ok.
I am ready to pack up the whole directory and attach it here if you think it will make any difference
Unfortunately the project it’s not on github as it’s hosted on aws amazon