简体   繁体   English

为什么ri不显示TCPSocket类?

[英]Why does ri not show TCPSocket class?

I am trying to search TCPSocket ruby class documentation with ri but it shows nothing. 我正在尝试使用ri搜索TCPSocket ruby类文档,但未显示任何内容。 Most of the gems are shown. 显示了大多数宝石。 I am using rvm , and require 'socket' works perfectly. 我正在使用rvm ,并且require 'socket'完美工作。 How to fix this? 如何解决这个问题?

Try using: 尝试使用:

gem rdoc --all

The documentation says: 该文件说:

--all                        Generate RDoc/RI documentation for all
                                     installed gems

You can find these things out by typing: 您可以通过键入以下内容找到这些内容:

gem help

or 要么

gem help rdoc

at the command line. 在命令行中。

You might want to throw on --overwrite to overwrite existing documentation. 您可能要抛出--overwrite来覆盖现有文档。

Old versions of Ruby, around 1.8, didn't always have the core and/or std-lib documentation generated. 大约1.8的旧版本Ruby并不总是生成核心和/或std-lib文档。 There's a gem you can install that patches that, but I don't remember what it was right now. 您可以安装一个gem来安装该补丁,但是我不记得现在是什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM