# Rubygem, rdoc, ri,

**URL:** <https://www.ruby-forum.com/t/rubygem-rdoc-ri/52144>\
**Category:** Ruby\
**Created:** [January 11, 2006, 10:25am UTC](https://www.ruby-forum.com/t/rubygem-rdoc-ri/52144 "2006-01-11T10:25:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pierre\_Barbier\_de\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c89c15/32.png) [@Pierre\_Barbier\_de\_R](https://www.ruby-forum.com/u/Pierre_Barbier_de_R)\
**Post date:** [January 11, 2006, 10:25am UTC](https://www.ruby-forum.com/t/rubygem-rdoc-ri/52144/1 "2006-01-11T10:25:24Z")

</div>

Hi !

I cannot successfully generate any documentation with rubygem !  
I tried (with RubyInline) :  
$ gem install RubyInline --doc  
$ gem rdoc RubyInline  
$ gem rdoc --all

… but none of these generates the doc !  
However, if, within the installe RubyInline I type :  
$ rdoc --all

… well, it just generates corectly the doc in HTML.

Ok, also, how do I access the doc of the ruby gems using ri or rbbr ? I  
saw nothing that would allow me to do so :S

thanks, and I hope my googlefu did not fail me too much :S

Pierre

---

<div class="post-metadata">

**Author:** ![Pierre\_Barbier\_de\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c89c15/32.png) [@Pierre\_Barbier\_de\_R](https://www.ruby-forum.com/u/Pierre_Barbier_de_R)\
**Post date:** [January 11, 2006, 11:28am UTC](https://www.ruby-forum.com/t/rubygem-rdoc-ri/52144/2 "2006-01-11T11:28:46Z")

</div>

On Jan 11, 2006, at 1:23 AM, Pierre Barbier de Reuille wrote:

> I cannot successfully generate any documentation with rubygem !  
> I tried (with RubyInline) :  
> $ gem install RubyInline --doc  
> $ gem rdoc RubyInline  
> $ gem rdoc --all

Not your fault. From the gemspec:

s.has\_rdoc = false # I SUCK - TODO

> Ok, also, how do I access the doc of the ruby gems using ri or  
> rbbr ? I  
> saw nothing that would allow me to do so :S

You don’t. This is not a capability of ri. I don’t know what rbbr is.

---

<div class="post-metadata">

**Author:** ![Pierre\_Barbier\_de\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c89c15/32.png) [@Pierre\_Barbier\_de\_R](https://www.ruby-forum.com/u/Pierre_Barbier_de_R)\
**Post date:** [January 11, 2006, 11:59am UTC](https://www.ruby-forum.com/t/rubygem-rdoc-ri/52144/3 "2006-01-11T11:59:01Z")

</div>

Ryan D. a écrit :

> Not your fault. From the gemspec:  
> removed\_email\_address@domain.invalid - Seattle.rb - [http://www.zenspider.com/](http://www.zenspider.com/)  
> seattle.rb  
> [http://blog.zenspider.com/](http://blog.zenspider.com/) - [http://rubyforge.org/projects/ruby2c](http://rubyforge.org/projects/ruby2c)

Thanks,

For rbbr, it stands for “Ruby Browser”, kind of a graphical interface to  
ri … but not exactly. However, it is really usefull, even if still a  
little bit buggy :

[http://ruby-gnome2.sourceforge.jp/fr/hiki.cgi?rbbr](http://ruby-gnome2.sourceforge.jp/fr/hiki.cgi?rbbr)

Pierre

---

<div class="post-metadata">

**Author:** ![Pierre\_Barbier\_de\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c89c15/32.png) [@Pierre\_Barbier\_de\_R](https://www.ruby-forum.com/u/Pierre_Barbier_de_R)\
**Post date:** [January 11, 2006, 4:31pm UTC](https://www.ruby-forum.com/t/rubygem-rdoc-ri/52144/4 "2006-01-11T16:31:00Z")

</div>

> > Ok, also, how do I access the doc of the ruby gems using ri or  
> > rbbr ? I  
> > saw nothing that would allow me to do so :S
> 
> You don’t. This is not a capability of ri.

I love using ri to browse documentation and I’m amazed that it is not  
capable of showing the documentation for ruby gems. Does anybody have  
a good idea for how this might be achieved?

---

<div class="post-metadata">

**Author:** ![Pierre\_Barbier\_de\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c89c15/32.png) [@Pierre\_Barbier\_de\_R](https://www.ruby-forum.com/u/Pierre_Barbier_de_R)\
**Post date:** [January 11, 2006, 4:52pm UTC](https://www.ruby-forum.com/t/rubygem-rdoc-ri/52144/5 "2006-01-11T16:52:31Z")

</div>

Mark V. wrote:

> 1. start a local gem server by running “gem\_server”
> 2. in a web browser, browse “[http://localhost:8808](http://localhost:8808)”
> 3. click the “[rdoc]” links next to names of gems
> 
> –  
> R. Mark V.  
> Partner, Object Computing, Inc.

For shame, since having the .rd files available for tools that process  
them for gems too would certainly have its merits.

David V.

---

<div class="post-metadata">

**Author:** ![Pierre\_Barbier\_de\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c89c15/32.png) [@Pierre\_Barbier\_de\_R](https://www.ruby-forum.com/u/Pierre_Barbier_de_R)\
**Post date:** [January 11, 2006, 3:17pm UTC](https://www.ruby-forum.com/t/rubygem-rdoc-ri/52144/6 "2006-01-11T15:17:14Z")

</div>

On 1/11/06, Pierre Barbier de Reuille  
\<pierre\_dot\_barbier@\_nospam\_cirad.fr\> wrote:

> Ok, also, how do I access the doc of the ruby gems using ri or rbbr ? I  
> saw nothing that would allow me to do so :S

The way to view RDoc generated by RubyGems is to

1. start a local gem server by running “gem\_server”
2. in a web browser, browse “[http://localhost:8808](http://localhost:8808)”
3. click the “[rdoc]” links next to names of gems

---

<div class="post-metadata">

**Author:** ![Pierre\_Barbier\_de\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c89c15/32.png) [@Pierre\_Barbier\_de\_R](https://www.ruby-forum.com/u/Pierre_Barbier_de_R)\
**Post date:** [January 11, 2006, 5:21pm UTC](https://www.ruby-forum.com/t/rubygem-rdoc-ri/52144/7 "2006-01-11T17:21:00Z")

</div>

On Wed, 11 Jan 2006 15:27:46 -0000, mr ra88it [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > > Ok, also, how do I access the doc of the ruby gems using ri or  
> > > rbbr ? I  
> > > saw nothing that would allow me to do so :S
> > 
> > You don’t. This is not a capability of ri.
> 
> I love using ri to browse documentation and I’m amazed that it is not  
> capable of showing the documentation for ruby gems. Does anybody have  
> a good idea for how this might be achieved?

If you really don’t care about having the RDoc available via gem\_server,  
then you could do something like the following. I’ll assume here that  
gems  
are installed as root, for use sitewide.

Just create a file, /root/.gemrc , with the following:

```
rdoc: --ri-site

```

Now run an install for a gem that you know has rdoc:

```
su -c 'gem install cmdparse'

```

Doesn’t matter if it’s already installed. Now check it’s worked and is  
available to all users:

```
ri CmdParse::CommandParser

```

(substitute another if you have cmdparse ri already installed :))

As I say though doing this you’ll lose the RDoc you get in gem\_server I  
guess, but you should get RI on tap for your gems. Very nice from  
Eclipse.

As a footnote, check out [http://docs.rubygems.org/read/chapter/11#page55](http://docs.rubygems.org/read/chapter/11#page55)  
for more information. You could do this on a per-gem basis, for example,  
by having a special config file you supply when needed, and it can be  
tailored to per-user gem install or whatever too I think.

Cheers,
