On 7/21/02 12:13 PM, "Jim Freeze" <jfreeze / freebsdportal.com> wrote:

> Hi:
> 
> I have installed ruby on maxosx, but am having trouble with
> getting irb to run.
> 
> I used fink at first, but irb would not run. I then uninstalled
> ruby and installed 1.6.7 manually with the following commands:
> 
> ./configure --prefix=/sw --with-sitedir=/sw/lib/ruby/site_ruby
> 
> When I run irb I get the following error:
> % irb 
> /sw/lib/ruby/1.6/irb/completion.rb:10:in `require': No such file to load --
> readline (LoadError)
>       from /sw/lib/ruby/1.6/irb/completion.rb:10
>       from /sw/lib/ruby/1.6/irb/init.rb:197:in `require'
>       from /sw/lib/ruby/1.6/irb/init.rb:197:in `load_modules'
>       from /sw/lib/ruby/1.6/irb/init.rb:195:in `each'
>       from /sw/lib/ruby/1.6/irb/init.rb:195:in `load_modules'
>       from /sw/lib/ruby/1.6/irb.rb:52:in `start'
>       from /sw/bin/irb:13
> 
> 
> It appears that readline is not installed:
> 
> % find /sw/lib -name readline\*
> --returns nothing

Jim, I don't know why Fink didn't put readline where Fink is looking for it
but you should already have readline installed in:
/System/Library/PrivateFrameworks/readline.framework/readline

So the question is "Why isn't require finding the readline that's already
installed in OSX?" Or maybe a better version is "How come Chris's version of
irb finds readline down in /System/Library/... while Jim's does not." None
of the Frameworks actually show up in my $: path.

Well I don't have a definitive answer but I suspect that it's because I
built ruby with --enable-shared as Fujimoto Hisakuni suggested. I went down
the path with someone else on this list who didn't have ncurses and that
turned out to be the difference.

Please see if using -enable-shared works for you. If it doesn't, post again
and we'll work through it.

From memory though, --enable-shared forces the static linker, ld, to build a
version of ruby that gives the dynamic linker, dyld, a chance to satisfy
externals at runtime.
-- 
I have discovered that all human evil comes from this, man's being unable
to sit still in a room. -Blaise Pascal, philosopher and mathematician
(1623-1662)