[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

How to use ri with a new package

RichardOnRails

10/24/2007 2:38:00 AM

Hi All,

I just used gem to install the package "sys-admin" from the RubyForge
sysadmin project by Daniel Berger. The example that Daniel provided
for using sys-admin worked fine.

I'd like to use ri to display the RDoc documentation, but I can't
figure out how.

The package is installed at K:\_Utilities\Ruby_1.8.2-15\ruby\lib\ruby
\gems\1.8\doc\sys-admin-1.4.2-mswin32.
The rdoc subdirectory had files like fr_???_index.html for ??? =
class, file, method. Double-clicking them does produce RDoc-style
documentation. But how can I use ri to bring up that documentation
without resorting to Windows Explorer?

I tried a few other things to no avail. The following ri command
produces documentation of the "class" method of the class Object, not
a list of classes of the sys-admin package:
K:\_Utilities\Ruby_1.8.2-15\ruby\lib\ruby\gems\1.8\doc\sys-admin-1.4.2-
mswin32\rdoc>ri class
-----------------------------------------------------------
Object#class
obj.class => class
------------------------------------------------------------------------
Returns the class of _obj_, now preferred over +Object#type+, as
an
object's type in Ruby is only loosely tied to that object's
class.
This method must always be called with an explicit receiver, as
+class+ is also a reserved word in Ruby.

1.class #=> Fixnum
self.class #=> Object

I thought "ri index" might do it, but instead I got:
K:\_Utilities\Ruby_1.8.2-15\ruby\lib\ruby\gems\1.8\doc\sys-admin-1.4.2-
mswin32\rdoc>ri index
More than one method matched your request. You can refine
your search by asking for information on one of:

Array#each_index, Array#index, Array#indexes, Array#rindex,
Enumerable#each_with_index, Generator#index, Hash#index,
Hash#indexes, String#index, String#rindex

Thanks in advance,
Richard

3 Answers

7stud --

10/24/2007 4:32:00 AM

0

RichardOnRails wrote:
> Double-clicking them does produce RDoc-style
> documentation. But how can I use ri to bring up that documentation
> without resorting to Windows Explorer?
>

You could create a shortcut on your desktop to the docs, or you can
type the command:

..../.../> gem_server

and then open up a browser and enter the address:

http://localhost:8808

in your browser's address bar. That should bring up a page that lists
all rubygems you've installed with links to their rdocs.

Personally, I think the shortcut method is easier.


--
Posted via http://www.ruby-....

RichardOnRails

10/24/2007 2:44:00 PM

0

On Oct 24, 12:31 am, 7stud -- <bbxx789_0...@yahoo.com> wrote:
> RichardOnRails wrote:
> > Double-clicking them does produce RDoc-style
> > documentation. But how can I use ri to bring up that documentation
> > without resorting to Windows Explorer?
>
> You could create a shortcut on your desktop to the docs, or you can
> type the command:
>
> .../.../> gem_server
>
> and then open up a browser and enter the address:
>
> http://localhost:8808
>
> in your browser's address bar. That should bring up a page that lists
> all rubygems you've installed with links to their rdocs.
>
> Personally, I think the shortcut method is easier.
>
> --
> Posted viahttp://www.ruby-....

Great response! I chose option #1. Getting something like
http://www.ruby-doc.o... for my installed packages is exactly
what I wanted. Thanks.

I'm going to try to incorporate those commands in a Windows' WHS
script.

Again, thanks.
Richard

Bernard Kenik

10/25/2007 7:33:00 PM

0

On Oct 24, 10:44 am, RichardOnRails
<RichardDummyMailbox58...@USComputerGurus.com> wrote:
> On Oct 24, 12:31 am, 7stud -- <bbxx789_0...@yahoo.com> wrote:
>
>
>
>
>
> > RichardOnRails wrote:
> > > Double-clicking them does produce RDoc-style
> > > documentation. But how can I use ri to bring up that documentation
> > > without resorting to Windows Explorer?
>
> > You could create a shortcut on your desktop to the docs, or you can
> > type the command:
>
> > .../.../> gem_server
>
> > and then open up a browser and enter the address:
>
> >http://localhost:8808
>
> > in your browser's address bar. That should bring up a page that lists
> > all rubygems you've installed with links to their rdocs.
>
> > Personally, I think the shortcut method is easier.
>
> > --
> > Posted viahttp://www.ruby-....
>
> Great response! I chose option #1. Getting something likehttp://www.ruby-doc.org/... my installed packages is exactly
> what I wanted. Thanks.
>
> I'm going to try to incorporate those commands in a Windows' WHS
> script.
>
> Again, thanks.
> Richard- Hide quoted text -
>
> - Show quoted text -

ri Sys::Admin

will get you the ri documentation you want