# \[ANN\] IHelp 0.4.0 - full text search

**URL:** <https://rubytalk.org/t/ann-ihelp-0-4-0-full-text-search/33003>\
**Category:** ruby-talk\
**Created:** [16 November 2006 21:46 UTC](https://rubytalk.org/t/ann-ihelp-0-4-0-full-text-search/33003 "2006-11-16T21:46:05Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ilmari\_Heikkinen](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@Ilmari\_Heikkinen](https://rubytalk.org/u/Ilmari_Heikkinen)\
**Post date:** [16 November 2006 21:46 UTC](https://rubytalk.org/t/ann-ihelp-0-4-0-full-text-search/33003/1 "2006-11-16T21:46:05Z")

</div>

View and search object documentation from irb.

sudo gem install ihelp

Downloads: [http://rubyforge.org/frs/?group\_id=2597](http://rubyforge.org/frs/?group_id=2597)  
Documentation: [http://ihelp.rubyforge.org](http://ihelp.rubyforge.org)  
Project page: [http://rubyforge.org/projects/ihelp/](http://rubyforge.org/projects/ihelp/)  
Screenshots:  
&nbsp;&nbsp;[http://ihelp.rubyforge.org/ihelp1.png](http://ihelp.rubyforge.org/ihelp1.png)  
&nbsp;&nbsp;[http://ihelp.rubyforge.org/ihelp2.png](http://ihelp.rubyforge.org/ihelp2.png)

REQUIREMENTS

\* Generated RI docs (make install-doc)  
\* Ferret: [http://rubyforge.org/projects/ferret](http://rubyforge.org/projects/ferret)

NEW FEATURES

On a bit of a similar tack with Mauricio, I wrote a full-text search  
over RI docs to IHelp. Being a good deal less hardcore than him, I  
used Ferret to achieve the task.

I think we'll merge the shared functionality some day, I'd rather roll  
all the nifty backend stuff into RI and have IHelp be a user interface  
to it.

QUICK USAGE

"How do I justify a string?"  
ihelp 'justifying strings'  
ihelp 'How do I justify a string?' # watch out for noise words

"I need to read little-endian ints from a string"

> String.help 'little-endian int'

"Hmm, how does String#unpack work?"

> String.help:unpack

"Okay, so now I have this Array of ints, what was the syntax of inject again?"

> ints.help:inject

"What is this object and what can i do with it?"

> object.help

"Someone told me that I should look up Mutex#synchronize... but I  
don't have that loaded."

> help "Mutex#synchronize"

LOADING AUTOMATICALLY IN IRB

Add the following to your .irbrc:

# Loading RI may take a second or two so let's make it  
# snappier by loading in the background.  
Thread.new do  
&nbsp;&nbsp;require 'ihelp'  
end

## If you don't like the colors in the search results  
# IHelp.no\_colors = true

## Renderer to use, one of 'ri', 'rubydoc', 'emacs', 'source', 'html'  
## default is 'ri'  
# IHelp.renderer = 'rubydoc'

## Web browser to use with renderers 'rubydoc' and 'html'  
## default is 'firefox'  
# IHelp.web\_browser = 'konqueror'

---

<div class="post-metadata">

**Author:** ![Parragh\_Szabolcs](https://avatars.discourse-cdn.com/v4/letter/p/bb73d2/32.png) [@Parragh\_Szabolcs](https://rubytalk.org/u/Parragh_Szabolcs)\
**Post date:** [16 November 2006 22:03 UTC](https://rubytalk.org/t/ann-ihelp-0-4-0-full-text-search/33003/2 "2006-11-16T22:03:00Z")

</div>

Ilmari Heikkinen írta:

> View and search object documentation from irb.
> 
> sudo gem install ihelp

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\> gem install ihelp  
Building native extensions. This could take a while...  
No builder for extension 'lib/ihelp\_reindex.rb'  
ERROR: While executing gem ... (RuntimeError)  
&nbsp;&nbsp;&nbsp;&nbsp;ERROR: Failed to build gem native extension.  
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ihelp-0.4.0 for inspection.  
&nbsp;&nbsp;No builder for extension 'lib/ihelp\_reindex.rb'

-- what can be the problem?

> **···**
>
> --  
> Parragh Szabolcs  
> e-mail: parragh@dayka.hu  
> web: parszab.nir.hu

---

<div class="post-metadata">

**Author:** ![\_Pena\_Botp1](https://avatars.discourse-cdn.com/v4/letter/_/94ad74/32.png) [@\_Pena\_Botp1](https://rubytalk.org/u/_Pena_Botp1)\
**Post date:** [17 November 2006 04:19 UTC](https://rubytalk.org/t/ann-ihelp-0-4-0-full-text-search/33003/3 "2006-11-17T04:19:33Z")

</div>

:From =\> "Ilmari Heikkinen [[mailto:ilmari.heikkinen@gmail.com](mailto:ilmari.heikkinen@gmail.com)]"  
# used Ferret to achieve the task.

ouch.  
is ferret pure ruby? i have problems installing it in windows.

C:\temp\>gem update  
Updating installed gems...  
Need to update 12 gems from [http://gems.rubyforge.org](http://gems.rubyforge.org)  
............  
complete  
Attempting remote update of ihelp  
Install required dependency ferret? [Yn]  
Building native extensions. This could take a while...

ERROR: While executing gem ... (RuntimeError)  
&nbsp;&nbsp;&nbsp;&nbsp;ERROR: Failed to build gem native extension.  
Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.10.13  
for inspection.

# I think we'll merge the shared functionality some day, I'd rather roll

am enjoying fri now. is it hard to link w fri?

thanks for the useful ihelp.  
kind regards -botp

---

<div class="post-metadata">

**Author:** ![Ilmari\_Heikkinen](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@Ilmari\_Heikkinen](https://rubytalk.org/u/Ilmari_Heikkinen)\
**Post date:** [16 November 2006 22:36 UTC](https://rubytalk.org/t/ann-ihelp-0-4-0-full-text-search/33003/4 "2006-11-16T22:36:27Z")

</div>

Hi,

> Ilmari Heikkinen írta:  
> \> View and search object documentation from irb.  
> \>  
> \> sudo gem install ihelp  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\> gem install ihelp  
> Building native extensions. This could take a while...  
> No builder for extension 'lib/ihelp\_reindex.rb'  
> ERROR: While executing gem ... (RuntimeError)  
> &nbsp;&nbsp;&nbsp;&nbsp;ERROR: Failed to build gem native extension.  
> Gem files will remain installed in  
> /usr/lib/ruby/gems/1.8/gems/ihelp-0.4.0 for inspection.  
> &nbsp;&nbsp;No builder for extension 'lib/ihelp\_reindex.rb'
> 
> -- what can be the problem?

Argh, the problem is me using an old version of RubyGems for testing.  
I'm using gemspec #extensions to run the reindexing, but it appears to  
have changed.

Thanks for noticing this, should be fixed in 0.4.1.

> **···**
>
> On 11/17/06, Parragh Szabolcs \<parragh@dayka.hu\> wrote:
> 
> > --  
> > Parragh Szabolcs  
> > e-mail: parragh@dayka.hu  
> > web: parszab.nir.hu
> 
> --  
> Ilmari

---

<div class="post-metadata">

**Author:** ![Ilmari\_Heikkinen](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@Ilmari\_Heikkinen](https://rubytalk.org/u/Ilmari_Heikkinen)\
**Post date:** [17 November 2006 05:16 UTC](https://rubytalk.org/t/ann-ihelp-0-4-0-full-text-search/33003/5 "2006-11-17T05:16:49Z")

</div>

> :From =\> "Ilmari Heikkinen [mailto:ilmari.heikkinen@gmail.com]"  
> # used Ferret to achieve the task.
> 
> ouch.  
> is ferret pure ruby? i have problems installing it in windows.

Ack, good point. There however is a 0.10.9 windows binary and the  
Linux version of that seems to work alright. Could you try installing  
ferret-0.10.9-mswin32 and see if it works (as I don't have Windows  
handy |: )?

Just made a 0.4.3 gem without ferret in the gem dependency list.  
Without ferret it doesn't do text search, but works otherwise.

> # I think we'll merge the shared functionality some day, I'd rather roll
> 
> am enjoying fri now. is it hard to link w fri?

I've no idea, probably not too hard? I'll look into it over the weekend.

> thanks for the useful ihelp.  
> kind regards -botp

cheers,

> **···**
>
> On 11/17/06, Peña, Botp \<botp@delmonte-phil.com\> wrote:  
> --  
> Ilmari

---

<div class="post-metadata">

**Author:** ![Hemant\_Kumar](https://avatars.discourse-cdn.com/v4/letter/h/46a35a/32.png) [@Hemant\_Kumar](https://rubytalk.org/u/Hemant_Kumar)\
**Post date:** [17 November 2006 11:35 UTC](https://rubytalk.org/t/ann-ihelp-0-4-0-full-text-search/33003/6 "2006-11-17T11:35:48Z")

</div>

Please read:

[http://www.ruby-lang.org/en/community/mailing-lists/manual-instructions/](http://www.ruby-lang.org/en/community/mailing-lists/manual-instructions/)

[http://www.ruby-lang.org/en/community/mailing-lists/](http://www.ruby-lang.org/en/community/mailing-lists/)

gnufied

> **···**
>
> On 11/17/06, Hugo R. Brandao \<brandaohugo@hotmail.com\> wrote:
> 
> > How can i unsubscribe??
> > 
> > Thanx.
> 
> --  
> There was only one Road; that it was like a great river: its springs  
> were at every doorstep, and every path was its tributary.

---

<div class="post-metadata">

**Author:** ![Ilmari\_Heikkinen](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@Ilmari\_Heikkinen](https://rubytalk.org/u/Ilmari_Heikkinen)\
**Post date:** [16 November 2006 22:55 UTC](https://rubytalk.org/t/ann-ihelp-0-4-0-full-text-search/33003/7 "2006-11-16T22:55:46Z")

</div>

> Thanks for noticing this, should be fixed in 0.4.1.

Make that 0.4.2. Which is out now.

---

<div class="post-metadata">

**Author:** ![Parragh\_Szabolcs](https://avatars.discourse-cdn.com/v4/letter/p/bb73d2/32.png) [@Parragh\_Szabolcs](https://rubytalk.org/u/Parragh_Szabolcs)\
**Post date:** [17 November 2006 07:45 UTC](https://rubytalk.org/t/ann-ihelp-0-4-0-full-text-search/33003/8 "2006-11-17T07:45:00Z")

</div>

Ilmari Heikkinen írta:

> > Thanks for noticing this, should be fixed in 0.4.1.
> 
> Make that 0.4.2. Which is out now.

0.4.3 was it this morning:) But I get the following on my Ubuntu box:

\>\> require 'ihelp'  
/usr/lib/ruby/gems/1.8/gems/ihelp-0.4.3/lib/ihelp.rb:318: warning: already initialized constant RI\_ARGS  
=\> true  
\>\> String.help:unpack

unrecognized option `--readline'

For help on options, try 'ri --help'

--\> and irb exits.

> **···**
>
> --  
> Parragh Szabolcs  
> e-mail: parragh@dayka.hu  
> web: parszab.nir.hu

---

<div class="post-metadata">

**Author:** ![Ilmari\_Heikkinen](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@Ilmari\_Heikkinen](https://rubytalk.org/u/Ilmari_Heikkinen)\
**Post date:** [18 November 2006 21:33 UTC](https://rubytalk.org/t/ann-ihelp-0-4-0-full-text-search/33003/9 "2006-11-18T21:33:53Z")

</div>

> Ilmari Heikkinen írta:  
> \>\> Thanks for noticing this, should be fixed in 0.4.1.  
> \>  
> \> Make that 0.4.2. Which is out now.  
> 0.4.3 was it this morning:) But I get the following on my Ubuntu box:
> 
> \>\> require 'ihelp'  
> /usr/lib/ruby/gems/1.8/gems/ihelp-0.4.3/lib/ihelp.rb:318: warning:  
> already initialized constant RI\_ARGS  
> =\> true  
> \>\> String.help:unpack
> 
> unrecognized option `--readline'
> 
> For help on options, try 'ri --help'
> 
> --\> and irb exits.

And I thought I was doing a good thing passing ARGV to RI..  
Thanks for proving me wrong, disabled it in 0.4.4

> **···**
>
> On 11/17/06, Parragh Szabolcs \<parragh@dayka.hu\> wrote:
> 
> > --  
> > Parragh Szabolcs  
> > e-mail: parragh@dayka.hu  
> > web: parszab.nir.hu
> 
> --  
> Ilmari

---

<div class="post-metadata">

**Author:** ![Parragh\_Szabolcs](https://avatars.discourse-cdn.com/v4/letter/p/bb73d2/32.png) [@Parragh\_Szabolcs](https://rubytalk.org/u/Parragh_Szabolcs)\
**Post date:** [18 November 2006 22:02 UTC](https://rubytalk.org/t/ann-ihelp-0-4-0-full-text-search/33003/10 "2006-11-18T22:02:42Z")

</div>

Ilmari Heikkinen írta:

> And I thought I was doing a good thing passing ARGV to RI..  
> Thanks for proving me wrong, disabled it in 0.4.4

I updatet -- now it's okay. But now irb opens the help text in the pager -- can I turn it off?

> **···**
>
> --  
> Parragh Szabolcs  
> e-mail: parragh@dayka.hu  
> web: parszab.nir.hu

---

<div class="post-metadata">

**Author:** ![Parragh\_Szabolcs](https://avatars.discourse-cdn.com/v4/letter/p/bb73d2/32.png) [@Parragh\_Szabolcs](https://rubytalk.org/u/Parragh_Szabolcs)\
**Post date:** [18 November 2006 22:15 UTC](https://rubytalk.org/t/ann-ihelp-0-4-0-full-text-search/33003/11 "2006-11-18T22:15:01Z")

</div>

Parragh Szabolcs írta:

> Ilmari Heikkinen írta:
> 
> > And I thought I was doing a good thing passing ARGV to RI..  
> > Thanks for proving me wrong, disabled it in 0.4.4
> 
> I updatet -- now it's okay. But now irb opens the help text in the pager -- can I turn it off?

Oh, now I see:  
a) either you pass them =\> they might conflict,  
b) or you don't =\> than no clever RI settings  
-- that's a nice one;)

> **···**
>
> --  
> Parragh Szabolcs  
> e-mail: parragh@dayka.hu  
> web: parszab.nir.hu

---

<div class="post-metadata">

**Author:** ![Ilmari\_Heikkinen](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@Ilmari\_Heikkinen](https://rubytalk.org/u/Ilmari_Heikkinen)\
**Post date:** [19 November 2006 00:00 UTC](https://rubytalk.org/t/ann-ihelp-0-4-0-full-text-search/33003/12 "2006-11-19T00:00:15Z")

</div>

A workaround would be setting ENV["PAGER"] to cat

Or maybe I could pass only ENV["RI"] and not merge it with ARGV (no  
idea what I was thinking there) :]

> **···**
>
> On 11/19/06, Parragh Szabolcs \<parragh@dayka.hu\> wrote:
> 
> > Parragh Szabolcs írta:  
> > \> Ilmari Heikkinen írta:  
> > \>\>  
> > \>\> And I thought I was doing a good thing passing ARGV to RI..  
> > \>\> Thanks for proving me wrong, disabled it in 0.4.4  
> > \> I updatet -- now it's okay. But now irb opens the help text in the  
> > \> pager -- can I turn it off?  
> > \>  
> > Oh, now I see:  
> > a) either you pass them =\> they might conflict,  
> > b) or you don't =\> than no clever RI settings  
> > -- that's a nice one;)
