Missing ‘redcarpet’ gem for Markdown

(This is a legacy post from the old website.)

* Note, I’m not going to talk about how to make Redcarpet work. Instead I’m going to explain how to get Yard generating documentation again with a redcarpet alternative.

Maybe I’ve just been unlucky but I’ve had a number of run ins with
Redcarpet when using Yard over the years. I’ve learned that Yard can use
a number of markup-providers besides the Redcarpet gem.

For search purposes, here’s the verbage for my current scuffle with Redcarpet:

[error]: Missing ‘redcarpet’ gem for Markdown formatting. Install it with `gem install redcarpet`

To replace that redcarpet dependency:

1) generate a /.yardopts file if it doesn’t already exist. Any
configuration you provide in there will be picked up regardless if you
run yard directly or some Rake task calls yard with additional parameters.

2) Append a parameter to change the markup-provider.

--markup-provider <some markup-provider>

[image lost]

More options for a markup-provider beyond rdiscount are listed at: http://www.rubydoc.info/gems/yard/YARD/Templates/Helpers/MarkupHelper

3) Finally, ensure your Gemfile lists your new markup-provider.

Leave a Reply

Your email address will not be published. Required fields are marked *