Search code examples
rubyrubygemsbundlerorg-mode

How to use README.org instead of README.md for Ruby gem package


Now, I'm trying to create a Ruby gem. I use the gem template generated by bundle gem a_pkg_name. Then, "README.md" is created automatically and is used as the document of the gem by default. Can I use README.org (emacs org-mode document) instead of README.md (markdown document)? I know GitHub supports both "README" files and README.org is displayed if README.md doesn't exist. However, in the case of gem, rake build invokes an error if README.md doesn't exist.


Solution

  • My guess is, the problem lies in

    spec.files         = `git ls-files -z`.split("\x0")
    

    After you delete the README.md, committing the change to the git repo will get rid of the error.

    And about including README.org in your gem docs, you can achieve that by using "extra_rdoc_files",

    spec.extra_rdoc_files = ['README.org']