如何修复 rvm 中的 ri 文档重复

发布于 2024-11-29 13:00:41 字数 454 浏览 5 评论 0原文

这就是我想做的

ri Array

简单,对吧?

错误的!

More than one class or module matched your request. You can refine
your search by asking for information on one of:

    Array, TSortArray, Array, TSortArray

我在 Ubuntu Natty 上使用 RVM,默认(并且只有 ruby​​)是 jruby 1.6.3

我已经修改了我的 .rvmrc 以默认制作 ri 文档,因此

export rvm_gem_options=""

除此之外,据我所知,一切都是标准的。

有想法吗?

Here's what I want to do

ri Array

Simple, right?

Wrong!

More than one class or module matched your request. You can refine
your search by asking for information on one of:

    Array, TSortArray, Array, TSortArray

I am using RVM on Ubuntu Natty, default (and only ruby) is jruby 1.6.3

I have modified my .rvmrc to make ri documentation by default, thus

export rvm_gem_options=""

Beyond that, all is standard as far as I remember.

Ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

朦胧时间 2024-12-06 13:00:41

限制 RI 只搜索 Ruby 标准库中的文档

ri --system Array

,或者

将其添加到您的 .profile

export RI="--system"

但是,这样您就看不到新 gem 的文档...

所以,我尝试不限制 RI ...

只是,

gem rdoc --all

这似乎有效。


但我的最终答案是,

更新 .gemrc 使其看起来有点像这样

install:  --remote --gen-rdoc --run-tests
update: --remote --gen-rdoc --run-tests
rdoc:  --all --inline-source --line-numbers --promiscuous --show-hash

.rvmrc

export rvm_gem_options=""

Limit RI to search only the documentation from Ruby's standard library

ri --system Array

or,

add this to your .profile

export RI="--system"

But, then you don't get to see documentation for new gems...

So, I tried not limiting RI...

Just,

gem rdoc --all

Which seemed to work.


But my final answer is,

Update .gemrc to look a little like this

install:  --remote --gen-rdoc --run-tests
update: --remote --gen-rdoc --run-tests
rdoc:  --all --inline-source --line-numbers --promiscuous --show-hash

and .rvmrc

export rvm_gem_options=""
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文