After years of studying Ruby, one factoid has eluded me. Actually, more
than
one, but I have to start somewhere…
How, on a command line, can I do the equivalent of ‘apropos’ or ‘man’?
How
can I search the RDoc knowledge base installed on my own computer, with
a
‘less’ interface, without Googling for everything all the time?
After years of studying Ruby, one factoid has eluded me. Actually, more than
one, but I have to start somewhere…
How, on a command line, can I do the equivalent of ‘apropos’ or ‘man’? How
can I search the RDoc knowledge base installed on my own computer, with a
‘less’ interface, without Googling for everything all the time?
Assuming you installed the documentation, you can use ri.
‘man’? How
And for a better performing alternative, get Mauricio F. fastri eigenclass.org
It provides a qri command which pretty much directly substitutes for
ri. It’s available as a gem.
IIRC it is significantly faster if you install from a tarball rather
than as a gem, but I don’t remember why. Can someone enlighten me?
Presumably (and this is a wild stab in the dark) if it’s installed as a
gem, it requires rubygems before doing anything to do with your query.
Loading rubygems is itself a slow operation.
I am a dreamer and i also admit i like CSS and good looking, visual
clean documentation in a browser, but i still hope that one day a huge,
up-to-date ruby reference can be read online, maintained with useful
remarks (optional) by a community - and that we can leave rdoc as a
relict of the past - or keept it for those that want it, while I could
read the fancy, stylish online docu! Dont take this too serious, i am
just wishing and hoping! And yeah, I do think that rdoc looks not very
… satisfying :>
Excerpts from M. Edward (Ed) Borasky’s message of Sat Jul 21 06:09:14
+0300 2007:
‘man’? How
And for a better performing alternative, get Mauricio F. fastri eigenclass.org
It provides a qri command which pretty much directly substitutes for
ri. It’s available as a gem.
IIRC it is significantly faster if you install from a tarball rather
than as a gem, but I don’t remember why. Can someone enlighten me?
During the build I see:
A small note about RubyGems + FastRI
====================================
RubyGems adds a noticeable overhead to fri, making it run slower than if
you
installed it directly from the tarball with setup.rb.
I guess either I don’t have much indexed, or I’m in need of a looser
search than the default? Do I need to do something to make sure ruby
and the Gems I’ve got installed are indexed? I guess the likely
answer is YES!
I am a dreamer and i also admit i like CSS and good looking, visual
clean documentation in a browser, but i still hope that one day a huge,
up-to-date ruby reference can be read online, maintained with useful
remarks (optional) by a community - and that we can leave rdoc as a
relict of the past - or keept it for those that want it, while I could
read the fancy, stylish online docu! Dont take this too serious, i am
just wishing and hoping! And yeah, I do think that rdoc looks not very
… satisfying :>
I’ve compiled my own rdoc of every library I have use and the core,
using a template I found online, and it looks VERY good, including
stuff like javascript search-as-you-type of the whole index (separate
for methods, files, classes).