yoon
yoon

Reputation: 500

jekyll error building page related to kramdown parser

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

Upvotes: 37

Views: 13300

Answers (4)

Anon E mous
Anon E mous

Reputation: 1

What worked for me was to add:

gem "rexml"

to the Gemfile.

Upvotes: 0

Full Array
Full Array

Reputation: 807

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

Upvotes: 1

aron
aron

Reputation: 1437

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

Now the serve command completes successfully.

Upvotes: 64

Rubel Hossain
Rubel Hossain

Reputation: 2733

  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.

Upvotes: 9

Related Questions