yard icon indicating copy to clipboard operation
yard copied to clipboard

[error]: Missing 'commonmarker ' gem for Markdown formatting. Install it with `gem install commonmarker`

Open pboling opened this issue 1 year ago • 1 comments

I have commonmarker installed, and in my Gemfile. I am running latest yard, commonmarker, rubygems, bundler, and ruby (3.3.5).

In my Rakefile, I have:

  require "yard"

  YARD::Rake::YardocTask.new do |t|
    t.files = ["lib/**/*.rb"]
    t.options = ["--debug", "--markup", "markdown", "--markup-provider", "commonmarker"]
  end

Steps to reproduce

git clone https://github.com/oauth-xx/ruby-openid2.git
cd ruby-openid2
bundle install
bundle exec rake yard

Actual Output

❯ bundle exec rake yard
[error]: Missing 'commonmarker' gem for Markdown formatting. Install it with `gem install commonmarker`

Expected Output

I expected yard to generate documentation.

Environment details:

  • OS: MacOS Sonoma 14.6.1
  • Ruby version (ruby -v): ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [arm64-darwin23]
  • Rubygems version (gem -v): 3.5.20
  • Bundler version (bundle -v): Bundler version 2.5.20
  • YARD version (yard -v): yard 0.9.37
  • Relevant software dependency/versions:
    • commonmarker
❯ bundle info commonmarker
Running `bundle info commonmarker` with bundler 2.5.20
Found no changes, using resolution from the lockfile
  * commonmarker (1.1.5)
        Summary: CommonMark parser and renderer. Written in Rust, wrapped in Ruby.
        Homepage: https://github.com/gjtorikian/commonmarker
        Source Code: https://github.com/gjtorikian/commonmarker
        Funding: https://github.com/sponsors/gjtorikian/
        Path: /Users/pboling/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/commonmarker-1.1.5-arm64-darwin

I have read the Contributing Guide.

pboling avatar Sep 25 '24 21:09 pboling

Unfortunately, you have to use an older (< 1.0) version of Commonmarker: https://github.com/lsegal/yard/issues/1528

haines avatar Oct 30 '24 11:10 haines