def generate_ri
    setup_rdoc
    install_ri # RDoc bug, ri goes first

    FileUtils.mkdir_p @doc_dir unless File.exist?(@doc_dir)
  end
#
Generate the RI documents for this gem spec.

Note that if both RI and RDoc documents are generated from the same
process, the RI docs should be done first (a likely bug in RDoc will cause
RI docs generation to fail if run after RDoc).