Having trouble changing themes

Sorry if this is a dumb question, but I’m just starting with jekyll and haven’t found a fix yet.
When I try to switch from minima, I put the new gem in the gem file (gem “jekyll-theme-primer” right under where minima is) and change the config file to theme: jekyll-theme-primer

I run bundle update and it says everything is fine. When I try to bundle exec jekyll serve, it returns

Configuration file: C:/Users/skbat/Desktop/skb/_config.yml
Source: C:/Users/skbat/Desktop/skb
Destination: C:/Users/skbat/Desktop/skb/_site
Incremental build: disabled. Enable with --incremental
Generating…
Not Installed: No such file or directory - git
ERROR: YOUR SITE COULD NOT BE BUILT:
------------------------------------
No repo name found. Specify using PAGES_REPO_NWO environment variables, ‘repository’ in your configuration, or set up an ‘origin’ git remote pointing to your github.com repository.
------------------------------------------------
Jekyll 4.0.0 Please append --trace to the serve command
for any additional information or backtrace.
------------------------------------------------

How can I make the new theme work? Thanks!

Based on your error report, you don’t seem to have Git installed on your system.
Technically, Git is not required for Jekyll’s core functionality. However, some plugins and extensions expect Git to be installed.
One such plugin is jekyll-github-metadata which is bundled with the github-pages gem.

To partially workaround the limitation, ensure that you don’t put github-pages under the :jekyll_plugins group in the Gemfile and manually add the required plugin-gems and the theme-gem to both the Gemfile and config file.

1 Like