WP-API / docs-v2

Documentation for version 2 of the API
http://v2.wp-api.org
58 stars 76 forks source link

Error when trying to serve documentation locally #80

Closed kadamwhite closed 8 years ago

kadamwhite commented 8 years ago

I am getting this error when running jekyll serve:

Configuration file: /repos/wp-api/docs-v2/_config.yml
            Source: /repos/wp-api/docs-v2
       Destination: /repos/wp-api/docs-v2/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
  Dependency Error: Yikes! It looks like you don't have redcarpet 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 -- redcarpet' 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 'changes-beta-1.md':
                    redcarpet
             ERROR: YOUR SITE COULD NOT BE BUILT:
                    ------------------------------------
                    redcarpet

Versions:

danielbachhuber commented 8 years ago

I got this error too the last time I tried building docs locally :(

rmccue commented 8 years ago

Solution: install Redcarpet :)

sudo gem install redcarpet

This is documented in the Jekyll docs, IIRC?

danielbachhuber commented 8 years ago

After an hour or so of pain associated with trying to solve the dependency hell, I came across this SO thread.

bundle exec jekyll serve --watch works for me. @kadamwhite can you verify?

kadamwhite commented 8 years ago

Sorry for the lag, yes, bundle exec jekyll serve worked for me. Thanks!

rmccue commented 8 years ago

FWIW, I think the GH Pages gem is the officially supported best way to test locally, and I think that handles dependencies properly. Might be worth investigating.

danielbachhuber commented 8 years ago

FWIW, I think the GH Pages gem is the officially supported best way to test locally

I have that installed too. Running through bundler means the appropriate versions of the dependencies are used.