How I Broke Jekyll With My Gemfile
New as I am to Jekyll, Bundler, and Ruby Gems as a whole for that matter, it was only a matter of time before I messed things up royally. Specifically, I started getting the following when running jekyll serve
:
The suggested solution wasn't a whole lot of help, resulting in exactly the same error, and somehow I ended up with additional warnings about multiple versions of Jekyll.
I eventually figured out that this was caused by a Gemfile I'd added in order to use Thor to create new blog posts.
My Gemfile as it stood contained just these lines:
Which was apparently resulting in Jekyll's import path being limited to just those two gems. Hence a significant chunk of Jekyll's dependencies could not be found, resulting in an error on the first one encountered, Kramdown.
The frustratingly simple fix for this was to add the following line to my Gemfile:
Or, if you're using Github Pages like me:
Then run a quick bundle install
to refresh the lock file. If it still doesn't work, it may be necessary to run bundle clean --force
and then another install, but this will wipe ALL your existing installed Gems.