【发布时间】:2026-01-31 22:55:01
【问题描述】:
有人可以告诉我如何安装 v2.1.7 的 ri 文档吗?
我尝试了“How do I install the Ruby ri documentation?”,但没有成功。
我更喜欢安装 ri,这样我就可以直接在类中查找特定方法,而无需打开帮助文件。
另外,我在以下方面没有运气:
C:\Users\ram\ruby>gem install rdoc-data
Fetching: rdoc-data-4.0.1.gem (100%)
rdoc-data is only required for C ruby 1.8.7 or 1.9.1.
rdoc-data is required for JRuby.
To install ri data for RDoc 4.0+ run:
rdoc-data --install
Successfully installed rdoc-data-4.0.1
Parsing documentation for rdoc-data-4.0.1
Installing ri documentation for rdoc-data-4.0.1
Done installing documentation for rdoc-data after 1 seconds
1 gem installed
C:\Users\ram\ruby>ri Array
Nothing known about Array
C:\Users\ram\ruby>rdoc-data --install
Your ruby version 2.1.7 is not supported, only 1.8.7, 1.9.2, 1.9.3, 2.0.0
对于 v2.1.7 似乎还需要其他东西。
请注意,这是针对 Windows 的。我想在不使用 VM/Cygwin 等的情况下本地进行。
【问题讨论】: