LoginSignup
1

More than 5 years have passed since last update.

rdocじゃねぇよmarkdownだよ現象

Posted at
  • ruby (2.2.2)
  • rails (4.1.14)
  • yard (0.8.7.6)
.yardopts
--markup=markdown
--markup-provider=kramdown
$ bin/bundle exec yard
[error]: Invalid markup type 'rdoc' or markup provider (kramdown) is not registered.
../2.2.0/gems/yard-0.8.7.6/lib/yard/templates/helpers/html_helper.rb:101:in `html_markup_rdoc': undefined method `new' for nil:NilClass (NoMethodError)

原因: プロジェクト初期のREADME.rdoc を放置してた

yardoc.rb
        readme = Dir.glob('README{,*[^~]}').first
        readme ||= Dir.glob(files.first).first if options.onefile
        options.readme ||= CodeObjects::ExtraFileObject.new(readme) if readme
        options.files.unshift(options.readme).uniq! if options.readme

「このファイル、拡張子.rdoc だからrdocだよね!」 -> 「……kramdownってなにそれ?そんなプロバイダーはrdocにはないよ(´・ω・`)」というエラーなのであった。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1