[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

rubygem, rdoc, ri, ...

Pierre Barbier de Reuille

1/11/2006 9:23:00 AM

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
6 Answers

Ryan Davis

1/11/2006 10:26:00 AM

0


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.

--
ryand-ruby@zenspider.com - Seattle.rb - http://www.zens...
seattle.rb
http://blog.zens... - http://rubyforge.org/proje...




Pierre Barbier de Reuille

1/11/2006 11:00:00 AM

0

Ryan Davis a écrit :
>
> 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.
>
> --
> ryand-ruby@zenspider.com - Seattle.rb - http://www.zens...
> seattle.rb
> http://blog.zens... - http://rubyforge.org/proje...
>
>
>
>

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/hik...


Pierre

Mark Volkmann

1/11/2006 2:15:00 PM

0

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"
3) click the "[rdoc]" links next to names of gems

--
R. Mark Volkmann
Partner, Object Computing, Inc.


mr ra88it

1/11/2006 3:28:00 PM

0

> > 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?


David Vallner

1/11/2006 3:51:00 PM

0

Mark Volkmann wrote:

>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"
>3) click the "[rdoc]" links next to names of gems
>
>--
>R. Mark Volkmann
>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 Vallner


Ross Bamford

1/11/2006 4:10:00 PM

0

On Wed, 11 Jan 2006 15:27:46 -0000, mr ra88it <mr.ra88it@gmail.com> 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...
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,

--
Ross Bamford - rosco@roscopeco.remove.co.uk