[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

ri for gems working?

Roger Pack

6/11/2009 1:28:00 PM

For some reason I've never had success with ri + gems

ex:
rdp@li49-39:~$ gem install eventmachine
Successfully installed eventmachine-0.12.8
Installing ri documentation for eventmachine-0.12.8...
rdp@li49-39:~$ ri EventMachine
No ri documentation found in:

Was rdoc run to create documentation?


Installing Documentation
------------------------
'ri' uses a database of documentation built by the RDoc utility.

So, how do you install this documentation on your system? It depends on
how you installed Ruby.

_If you installed Ruby from source files_ (that is, if it some point you
typed 'make' during the process :), you can install the RDoc
documentation yourself. Just go back to the place where you have your
Ruby source and type

make install-doc

You'll probably need to do this as a superuser, as the documentation is
installed in the Ruby target tree (normally somewhere under
+/usr/local+.

_If you installed Ruby from a binary distribution_ (perhaps using a
one-click installer, or using some other packaging system), then the
team that produced the package probably forgot to package the
documentation as well. Contact them, and see if they can add it to the
next release.



shouldn't it have picked up the ri from the gem just installed?
Just wondering if this is a bug.
Thanks.
-=r
--
Posted via http://www.ruby-....

12 Answers

James Herdman

6/11/2009 3:14:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

Hi Roger.
Depending on how the documentation for EventMachine was written, your RI
command may not have been enough.

Try running the command "gem server". This will start up a web server that
hosts all of your local RDocs. Point your web browser of choice at
http://localhost:8808. You can find your docs here. Take a look at how
EventMachine does their documentation. That may help you use RI with the
EventMachine docs in the future.

I know the above solution isn't perfect, but given that documentation
quality is highly variable between projects, it's often the best solution.

James H.

On Thu, Jun 11, 2009 at 9:27 AM, Roger Pack <rogerpack2005@gmail.com> wrote:

> For some reason I've never had success with ri + gems
>
> ex:
> rdp@li49-39:~$ gem install eventmachine
> Successfully installed eventmachine-0.12.8
> Installing ri documentation for eventmachine-0.12.8...
> rdp@li49-39:~$ ri EventMachine
> No ri documentation found in:
>
> Was rdoc run to create documentation?
>
>
> Installing Documentation
> ------------------------
> 'ri' uses a database of documentation built by the RDoc utility.
>
> So, how do you install this documentation on your system? It depends on
> how you installed Ruby.
>
> _If you installed Ruby from source files_ (that is, if it some point you
> typed 'make' during the process :), you can install the RDoc
> documentation yourself. Just go back to the place where you have your
> Ruby source and type
>
> make install-doc
>
> You'll probably need to do this as a superuser, as the documentation is
> installed in the Ruby target tree (normally somewhere under
> +/usr/local+.
>
> _If you installed Ruby from a binary distribution_ (perhaps using a
> one-click installer, or using some other packaging system), then the
> team that produced the package probably forgot to package the
> documentation as well. Contact them, and see if they can add it to the
> next release.
>
>
>
> shouldn't it have picked up the ri from the gem just installed?
> Just wondering if this is a bug.
> Thanks.
> -=r
> --
> Posted via http://www.ruby-....
>
>

matt_neuburg

6/11/2009 3:35:00 PM

0

James Herdman <james.herdman@gmail.com> wrote:

> Try running the command "gem server". This will start up a web server that
> hosts all of your local RDocs.

Wow! Why didn't someone tell me about this sooner!!!?????

m.

Brian Candler

6/11/2009 3:51:00 PM

0

Roger Pack wrote:
> shouldn't it have picked up the ri from the gem just installed?

Possibly. Old versions of rubygems used to have a 'gemri' command, but
it doesn't seem to be there any more.

You can give the path explicitly: e.g.

ri -d /var/lib/gems/1.8/doc/activerecord-2.3.2/ri ActiveRecord::Base

But I find it easier just to do "gem server --daemon" then point a
browser at http://127.0...
--
Posted via http://www.ruby-....

Eric Hodel

6/11/2009 6:24:00 PM

0

On Jun 11, 2009, at 06:27, Roger Pack wrote:

> For some reason I've never had success with ri + gems
>
> ex:
> rdp@li49-39:~$ gem install eventmachine
> Successfully installed eventmachine-0.12.8
> Installing ri documentation for eventmachine-0.12.8...
> rdp@li49-39:~$ ri EventMachine
> No ri documentation found in:
>
> Was rdoc run to create documentation?
> [...]
>
> shouldn't it have picked up the ri from the gem just installed?
> Just wondering if this is a bug.

Depending on your ruby and RDoc version, ri may not pick up RubyGems
paths. Try installing RDoc 2.

Roger Pack

6/11/2009 7:50:00 PM

0


>> shouldn't it have picked up the ri from the gem just installed?
>> Just wondering if this is a bug.
>
> Depending on your ruby and RDoc version, ri may not pick up RubyGems
> paths. Try installing RDoc 2.

nice
C:\>gem install rdoc

and it works now for gems. You rock.
-=r
--
Posted via http://www.ruby-....

Tom Cloyd

6/12/2009 2:32:00 PM

0

Matt Neuburg wrote:
> James Herdman <james.herdman@gmail.com> wrote:
>
>
>> Try running the command "gem server". This will start up a web server that
>> hosts all of your local RDocs.
>>
>
> Wow! Why didn't someone tell me about this sooner!!!?????
>
> m.
>
>
>
Precisely my reaction. I'll say it again: If you code up something cool,
then don't market it, what's the point? Saying - "go read the code"
doesn't cut it. Put a message somewhere in the installation output. In
this - Eric H. - your wonderful Rubygems install/update CLI output needs
an addition, I'd say.

T.

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc@tomcloyd.com >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Ben Bleything

6/12/2009 2:50:00 PM

0

On Fri, Jun 12, 2009 at 7:32 AM, Tom Cloyd<tomcloyd@comcast.net> wrote:
> Precisely my reaction. I'll say it again: If you code up something cool,
> then don't market it, what's the point? Saying - "go read the code" doesn=
't
> cut it. Put a message somewhere in the =A0installation output. In this - =
Eric
> H. - your wonderful Rubygems install/update CLI output needs an addition,
> I'd say.

gem server has been around _forever_. It's in gem help. It's
mentioned in every book I've seen that talks about the RubyGems
system. Until this thread I thought it was common knowledge.

This isn't a marketing failure, though. You can't call out every
feature every time, plus many (most?) people never actually run the
rubygems installer. It is the user's responsibility to know their
tools. In this case, thinking "I wonder how to read the docs on a
gem?" and then running 'gem help' would have shown this immediately.

Ben

Eric Hodel

6/12/2009 9:15:00 PM

0

On Jun 12, 2009, at 07:32, Tom Cloyd wrote:
> Matt Neuburg wrote:
>> James Herdman <james.herdman@gmail.com> wrote:
>>
>>
>>> Try running the command "gem server". This will start up a web
>>> server that
>>> hosts all of your local RDocs.
>>
>> Wow! Why didn't someone tell me about this sooner!!!?????
>
> Precisely my reaction. I'll say it again: If you code up something
> cool, then don't market it, what's the point? Saying - "go read the
> code" doesn't cut it. Put a message somewhere in the installation
> output. In this - Eric H. - your wonderful Rubygems install/update
> CLI output needs an addition, I'd say.


You mean where it moved from `gem_server` to `gem server`:

0.9.5: http://rubyforge.org/forum/forum.php?foru...

Or where there were bug fixes or new features:

1.0.0: http://rubyforge.org/forum/forum.php?foru...
1.1.1: http://rubyforge.org/forum/forum.php?foru...
1.2.0: http://rubyforge.org/forum/forum.php?foru...
1.3.3: http://rubyforge.org/forum/forum.php?foru...

I know this last one at least put the message in the installation
output.

I also know that nobody reads it.

PS: It looks like gem_server has existed since the beginning of time, http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-...
mentions "Serve gems via webrick or CGI".



Roger Pack

6/13/2009 10:40:00 PM

0

Ben Bleything wrote:
> On Fri, Jun 12, 2009 at 7:32 AM, Tom Cloyd<tomcloyd@comcast.net> wrote:
>> Precisely my reaction. I'll say it again: If you code up something cool,
>> then don't market it, what's the point? Saying - "go read the code" doesn't
>> cut it. Put a message somewhere in the �installation output. In this - Eric
>> H. - your wonderful Rubygems install/update CLI output needs an addition,
>> I'd say.
>
> gem server has been around _forever_. It's in gem help. It's
> mentioned in every book I've seen that talks about the RubyGems
> system. Until this thread I thought it was common knowledge.

Unfortunately it isn't...totally expected...how to describe it...to run
a server in order to access rdocs, so many [most?] users just go happily
on their way without accessing local rdocs [or come up with their own
auto complete scripts [1] or static pages [2] [3]] for them.

What I'd like to see would be a plugin that updates a static index.html
page for them at install time. Though I suppose that wouldn't be
searchable...

The good news is that there are a few libs out there [gembox, sinatra
gem server] which try to fill that void, too. They look pretty spiffy.
Stay well.
-=r


[1] http://github.com/cldwalker/dotfiles/t...
[2] http://blog.olszowka.de/2009/02/13/rdoc-index-for-... from
http://jasonseifer.com/2009/02/22/offline-gem-se...
[3] http://www.ruby-...to...
--
Posted via http://www.ruby-....

Michael Guterl

6/13/2009 11:38:00 PM

0

On Sat, Jun 13, 2009 at 6:40 PM, Roger Pack<rogerpack2005@gmail.com> wrote:
> Ben Bleything wrote:
>> On Fri, Jun 12, 2009 at 7:32 AM, Tom Cloyd<tomcloyd@comcast.net> wrote:
>>> Precisely my reaction. I'll say it again: If you code up something cool=
,
>>> then don't market it, what's the point? Saying - "go read the code" doe=
sn't
>>> cut it. Put a message somewhere in the =EF=BF=BDinstallation output. In=
this - Eric
>>> H. - your wonderful Rubygems install/update CLI output needs an additio=
n,
>>> I'd say.
>>
>> gem server has been around _forever_. =C2=A0It's in gem help. It's
>> mentioned in every book I've seen that talks about the RubyGems
>> system. =C2=A0Until this thread I thought it was common knowledge.
>
> Unfortunately it isn't...totally expected...how to describe it...to run
> a server in order to access rdocs, so many [most?] users just go happily
> on their way without accessing local rdocs [or come up with their own
> auto complete scripts [1] or static pages [2] [3]] for them.
>
> What I'd like to see would be a plugin that updates a static index.html
> page for them at install time. =C2=A0Though I suppose that wouldn't be
> searchable...
>
> The good news is that there are a few libs out there [gembox, sinatra
> gem server] which try to fill that void, too. =C2=A0They look pretty spif=
fy.
> Stay well.
> -=3Dr
>
>
> [1] http://github.com/cldwalker/dotfiles/t...
> [2] http://blog.olszowka.de/2009/02/13/rdoc-index-for-... from
> http://jasonseifer.com/2009/02/22/offline-gem-se...
> [3] http://www.ruby-forum.com/to...
> --

I like bdoc http://github.com/manalang/bdoc/t...

"Bdoc is a simple replacement for gem server. All it does is look at
all of the Gems you have installed locally and creates a nice iframe
based browser that makes it easy to navigate between gem docs. IT DOES
NOT REQUIRE A SERVER FOR VIEWING=E2=80=A6 not like gem server does!"

Best,
Michael Guterl