Jekyll - rdiscount is missing but it is installed

1.5k views Asked by At

My Jekyll site stopped generating itself. When I start Jekyll, I get a missing dependency error for rdiscount:

~/src/markcerqueira.github.com [source] jekyll serve --watch

WARN: Unresolved specs during Gem::Specification.reset:
      pygments.rb (~> 0.6.0)
      redcarpet (~> 3.1)
      listen (~> 2.7)

WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Configuration file: /Users/Mark/Desktop/src/markcerqueira.github.com/_config.yml
            Source: /src/markcerqueira.github.com
       Destination: /src/markcerqueira.github.com/_site
      Generating... 
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/version.rb:3: warning: already initialized constant JSON::VERSION
/Library/Ruby/Gems/2.0.0/gems/json-1.8.3/lib/json/version.rb:3: warning: previous definition of VERSION was here
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/version.rb:4: warning: already initialized constant JSON::VERSION_ARRAY
/Library/Ruby/Gems/2.0.0/gems/json-1.8.3/lib/json/version.rb:4: warning: previous definition of VERSION_ARRAY was here
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/version.rb:5: warning: already initialized constant JSON::VERSION_MAJOR
/Library/Ruby/Gems/2.0.0/gems/json-1.8.3/lib/json/version.rb:5: warning: previous definition of VERSION_MAJOR was here
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/version.rb:6: warning: already initialized constant JSON::VERSION_MINOR
/Library/Ruby/Gems/2.0.0/gems/json-1.8.3/lib/json/version.rb:6: warning: previous definition of VERSION_MINOR was here
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/version.rb:7: warning: already initialized constant JSON::VERSION_BUILD
/Library/Ruby/Gems/2.0.0/gems/json-1.8.3/lib/json/version.rb:7: warning: previous definition of VERSION_BUILD was here
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:99: warning: already initialized constant JSON::NaN
/Library/Ruby/Gems/2.0.0/gems/json-1.8.3/lib/json/common.rb:99: warning: previous definition of NaN was here
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:101: warning: already initialized constant JSON::Infinity
/Library/Ruby/Gems/2.0.0/gems/json-1.8.3/lib/json/common.rb:101: warning: previous definition of Infinity was here
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:103: warning: already initialized constant JSON::MinusInfinity
/Library/Ruby/Gems/2.0.0/gems/json-1.8.3/lib/json/common.rb:103: warning: previous definition of MinusInfinity was here
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:128: warning: already initialized constant JSON::UnparserError
/Library/Ruby/Gems/2.0.0/gems/json-1.8.3/lib/json/common.rb:128: warning: previous definition of UnparserError was here

  Dependency Error:  Yikes! It looks like you don't have rdiscount 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 -- rdiscount' If you run into trouble, 
                     you can find helpful resources at http://jekyllrb.com/help/! 
  Conversion error: Jekyll::Converters::Markdown encountered an error while converting '_posts/2013-05-01-ant-dex-and-jars-all-over.md/#excerpt':
                    rdiscount
             ERROR: YOUR SITE COULD NOT BE BUILT:
                    ------------------------------------
                    rdiscount

rdiscount is installed:

~/src/markcerqueira.github.com [source] gem list rdiscount

*** LOCAL GEMS ***

rdiscount (2.1.7)
2

There are 2 answers

0
Mark On BEST ANSWER

Unsure why this fixed it, but running a bundle clean and bundle update fixed this problem.

~/src/markcerqueira.github.com [source] sudo bundle clean --force
~/src/markcerqueira.github.com [source] bundle update
~/src/markcerqueira.github.com [source] jekyll serve --watch

Configuration file: /Users/Mark/Desktop/src/markcerqueira.github.com/_config.yml
            Source: /src/markcerqueira.github.com
       Destination: /src/markcerqueira.github.com/_site
      Generating... 
                    done.
 Auto-regeneration: enabled for 'src/markcerqueira.github.com'
Configuration file: /src/markcerqueira.github.com/_config.yml
    Server address: http://0.0.0.0:4000/
  Server running... press ctrl-c to stop.

Maybe the json gem was causing some issues?

0
Kenneth Perez Salazar On

I had the same issue with a different gem, if the gem is installed it could be possible that for whatever the reason the bundle is not picking it up.

To make sure that the bundle recognizes it try using the following command:

sudo bundle add bunto-sitemap

After that check the bundle and if it is showing there as of now try the operation you were trying to run again. It should work