How do I install the Ruby ri documentation?

前端 未结 8 1443
既然无缘
既然无缘 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:17

    You might run into this issue under Docker. The official docker images come with no documentation, and apparently disable installing gem documentation.

    If image's and system ruby versions match (specifically, RbConfig::CONFIG["ruby_version"], which is e.g. 2.6.0 for ruby-2.6.1), you can:

    # apk add ruby-doc
    # cp -r /usr/share/ri /usr/local/share/ri
    

提交回复
热议问题