Jekyll Site Local Hosting Error After Gem-Based Theme Change

Hi! I’ve recently changed my Jekyll site’s theme to “Minimal”. The bundle install seemed to have gone smoothly, but when I try to serve the website using bundle exec jekyll serve, I get the following error message:

Liquid Exception: No such file or directory - git rev-parse HEAD in /_layouts/default.html

I’m pretty to all this and have no idea what’s going on. And for some reason, I don’t even see a layouts folder. Please see the image below for details. Thanks.

Jekyll can read the layouts files of a theme. You don’t need a _layouts folder yourself

Normally you’d have a folder in repo after bundle install called vendor. And that will have gems like the theme and the layouts inside that.

Your vendor directory is missing.

You might have actually run bundle install at the user or root level so it put gems outside the project.

So make sure you run bundle install at the project level by configuring it with a path.

bundle config --local path vendor/bundle
bundle install
bundle exec jekyll serve

Uh oh, I think I did something stupid. Now I have a new folder called “Ruby” in my project folder, and

An error occurred while installing http_parser.rb (0.6.0), and Bundler cannot continue.