为什么我的Ruby'ri'工具不返回命令提示符? [英] Why does my Ruby 'ri' tool not return results in command prompt?
问题描述
可能重复:
ruby 1.9 ri问题
当我尝试使用Ruby的 ri
工具在命令提示符窗口中获得关于类,方法等的帮助,似乎总是失败。例如,如果我键入:
When I try to use Ruby's ri
tool in a command prompt window to get help about classes, methods, etc. it seems to always fail. For example if I type:
ri Array
我收到一条消息说:
Updating class cache with 0 classes... Nothing known about Array
我正在使用Vista的Ruby 1.9.1p243(2009-07-16修订版)安装了[i386-mingw32]。
I am using Vista 64 with Ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32] installed.
如何配置 ri
可以正常工作? >
What should I do to configure ri
to work?
推荐答案
虽然这个问题很旧,但还没有人提供一个正确的解决方案。我遇到同样的问题,找到解决方案:
Although this question is old, nobody has yet provided a proper solution. I just ran into the same issue, and found the solution:
如果您使用RVM :
rvm docs generate-ri # <- Just the ri docs, much faster
rvm docs generate # <- Everything (rdoc + ri)
有关在这里管理RVM文档的更多信息:
https://rvm.io/rubies/docs
More info on managing RVM docs here:
https://rvm.io/rubies/docs
如果不是使用RVM :
gem install rdoc-data
# Regenerate system docs
rdoc-data --install
# Regenerate all gem docs
gem rdoc --all --overwrite
# Regenerate specific gem doc with specific version
gem rdoc gemname -v 1.2.3 --overwrite
这篇关于为什么我的Ruby'ri'工具不返回命令提示符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!