Ri for gems working?

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-forum.com/.

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-forum.com/\.

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.0.1:8808/

···

--
Posted via http://www.ruby-forum.com/\.

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

···

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.

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

m.

···

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.

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-forum.com/\.

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)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

···

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.

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

0.9.5: http://rubyforge.org/forum/forum.php?forum_id=23112

Or where there were bug fixes or new features:

1.0.0: http://rubyforge.org/forum/forum.php?forum_id=23113
1.1.1: http://rubyforge.org/forum/forum.php?forum_id=23525
1.2.0: http://rubyforge.org/forum/forum.php?forum_id=25353
1.3.3: http://rubyforge.org/forum/forum.php?forum_id=32072

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-talk/94935 mentions "Serve gems via webrick or CGI".

···

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.

Ben Bleything 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] GitHub - cldwalker/dotfiles: config files for my most used apps
[2] http://blog.olszowka.de/2009/02/13/rdoc-index-for-your-gems/ from
http://jasonseifer.com/2009/02/22/offline-gem-server-rdocs
[3] Ruby gems doc indexer - Ruby - Ruby-Forum

···

On Fri, Jun 12, 2009 at 7:32 AM, Tom Cloyd<tomcloyd@comcast.net> wrote:

--
Posted via http://www.ruby-forum.com/\.

I like bdoc http://github.com/manalang/bdoc/tree/master

"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… not like gem server does!"

Best,
Michael Guterl

···

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" 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] GitHub - cldwalker/dotfiles: config files for my most used apps
[2] http://blog.olszowka.de/2009/02/13/rdoc-index-for-your-gems/ from
http://jasonseifer.com/2009/02/22/offline-gem-server-rdocs
[3] Ruby gems doc indexer - Ruby - Ruby-Forum
--

I like bdoc http://github.com/manalang/bdoc/tree/master

So is Hannah or Darkfish better?

···

--
Posted via http://www.ruby-forum.com/\.

Last I heard, Hannah only worked on RDoc 2.3 and earlier. Darkfish is the way of the future, and provided Hannah was ported to RDoc 2.4+ it would simply be a matter of taste.

···

On Jun 13, 2009, at 20:02, Roger Pack wrote:

I like bdoc http://github.com/manalang/bdoc/tree/master

So is Hannah or Darkfish better?