33

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 didn't work either.

jekyll version 3.9.0 Bundler version 2.1.4
Adriaan
  • 17,741
  • 7
  • 42
  • 75
yoon
  • 460
  • 1
  • 5
  • 8
  • I haven't used Jekyll on my machine in a while, and I also have this issue on 10.15.6; reinstalling Jekyll and uninstalling and reinstalling all gems didn't help. – cdf1982 Aug 11 '20 at 16:38
  • @cdf1982 Yeah It didn't work for me either – yoon Aug 12 '20 at 00:48
  • I believe this may be due to the Github-suggested security fix for the flagged vulnerability in Kramdown, `Bump kramdown from 1.17.0 to 2.3.0`. It was after I applied this that this error popped up. The solution below fixed it. – Andrew Sep 21 '20 at 14:50

4 Answers4

56

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

Now the serve command completes successfully.

Joshua Pinter
  • 45,245
  • 23
  • 243
  • 245
aron
  • 1,317
  • 1
  • 12
  • 11
8
  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.
Rubel Hossain
  • 2,503
  • 2
  • 22
  • 23
1

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
Full Array
  • 769
  • 7
  • 12
0

What worked for me was to add:

gem "rexml"

to the Gemfile.

SwissCodeMen
  • 4,222
  • 8
  • 24
  • 34