How do I install the Ruby ri documentation?

前端 未结 8 1285
既然无缘
既然无缘 2020-12-05 02:56

I\'ve recently installed Ruby 1.9.1 on Windows 7, and apparently it doesn\'t come with the standard ri documentation. So when I do \'ri Array\', I get:

C:\\         


        
相关标签:
8条回答
  • 2020-12-05 03:31

    None of the proposed solutions worked for me. In the end the solution I found was super simple, so I'll leave it here. (I'm running ruby 2.2.4 on win7 x64 in case that's relevant)

    (captain obvious alert: ruby must be installed and in your PATH)

    -open cmd

    -$ gem install rdoc-data
    
    -$ rdoc-data --install
    

    And you're set! test that it worked by running:

    -$ ri Array It should give you all the lovely documentation for the class!

    Hope this helps!

    ps. I just noticed that this is the solution that Luis Lavena proposed in a comment, but his comment wasn't clear to me so I had continued searching. Basically this is the same solution but explained more clearly so that that doesn't happen to anyone else :)

    Cheers!

    0 讨论(0)
  • 2020-12-05 03:39

    Seems you have installer Ruby 1.9.1 distributed by the RubyInstaller project.

    You can use the Windows Help Files (CHM) that came with the installer instead of the ri documentation.

    The problem of the RI documentation is that some versions of RDoc have problems generating it and also generated more than 10 thousands files which slowed down the installers considerably.

    0 讨论(0)
提交回复
热议问题