jekyll error building page related to kramdown parser

Viewed 8969

Whenever I run the "bundle exec jekyll serve" it returns the error

Dependency Error: Yikes! It looks like you don't have kramdown-parser-gfm or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- kramdown-parser-gfm' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
Liquid Exception: kramdown-parser-gfm in /_layouts/default.html ERROR: YOUR SITE COULD NOT BE BUILT: ------------------------------------ kramdown-parser-gfm

so, I tried "gem install kramdown-parser-gfm", but it returns the same error after that. I also tried to remove and reinstall the jekyll and bundle, but it also didn't work.

jekyll version 3.9.0 Bundler version 2.1.4
3 Answers

I added gem "kramdown-parser-gfm" to the Gemfile and then ran bundle install.

Now the serve command completes successfully.

  1. delete the Gemfile.lock file
  2. go to gem file add gem "kramdown-parser-gfm"
  3. open terminal and give command bundler
  4. after install all packages, in terminal give command bundle exec jekyll serve I hope application will run properly now.

On Windows

If you open your gemfile, you will notice the following.

gem "jekyll", "~> 3.2.1"

If you have the specific jekyll version and after running "bundler", you will receive the following errors.

Bundler could not find compatible versions for gem "kramdown":
  In Gemfile:
    jekyll (~> 3.2.1) was resolved to 3.2.1, which depends on
      kramdown (~> 1.3)

    kramdown-parser-gfm was resolved to 1.1.0, which depends on
      kramdown (~> 2.0)

Remove the specific version of jekyll, like so:

gem "jekyll"

Do not forget to add webrick gem to gemfile

gem "webrick"

Run bundler again.

bundler

Finally, serve

bundle exec jekyll serve --livereload
Related