Install troubles

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:inrequire’
from /sw/lib/ruby/1.6/irb/init.rb:197:in load_modules' from /sw/lib/ruby/1.6/irb/init.rb:195:ineach’
from /sw/lib/ruby/1.6/irb/init.rb:195:in load_modules' from /sw/lib/ruby/1.6/irb.rb:52:instart’
from /sw/bin/irb:13

It appears that readline is not installed:

% find /sw/lib -name readline*
–returns nothing

This install method worked fine on FreeBSD and installed readline.so:

% find ruby/ -name readline*
ruby/lib/ruby/1.6/i386-freebsd4.6/readline.so

Can someone tell me how to get readline installed.

Thanks

···


Jim Freeze
If only I had something clever to say for my comment…
~

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.

···

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:inrequire’
from /sw/lib/ruby/1.6/irb/init.rb:197:in load_modules' from /sw/lib/ruby/1.6/irb/init.rb:195:ineach’
from /sw/lib/ruby/1.6/irb/init.rb:195:in load_modules' from /sw/lib/ruby/1.6/irb.rb:52:instart’
from /sw/bin/irb:13

It appears that readline is not installed:

% find /sw/lib -name readline*
–returns nothing


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)

I did the following:

make distclean
rm config.cache
./configure --enable-shared --prefix=/sw --with-sitedir=/sw/lib/ruby/site_ruby
make
sudo make install

Running irb produces the same error as above.

BTW, it appears that realine is installed at /System/Library/Private.framework/…
(Man what a convoluted path)

···

On Mon, Jul 22, 2002 at 08:21:01AM +0900, Chris Gehlker wrote:

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:inrequire’
from /sw/lib/ruby/1.6/irb/init.rb:197:in load_modules' from /sw/lib/ruby/1.6/irb/init.rb:195:ineach’
from /sw/lib/ruby/1.6/irb/init.rb:195:in load_modules' from /sw/lib/ruby/1.6/irb.rb:52:instart’
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.


Jim Freeze
If only I had something clever to say for my comment…
~

I did the following:

make distclean
rm config.cache
./configure --enable-shared --prefix=/sw --with-sitedir=/sw/lib/ruby/site_ruby
make
sudo make install

Well, since that did not work, tried to install again via fink and
I get:

-> fink install ruby
sudo /sw/bin/fink install ruby
Reading package info…
Information about 620 packages read in 9 seconds.
dpkg -i /sw/fink/dists/stable/main/binary-darwin-powerpc/languages/ruby_1.6.6-2_darwin-powerpc.deb
Selecting previously deselected package ruby.
(Reading database … 23766 files and directories currently installed.)
Unpacking ruby (from …/ruby_1.6.6-2_darwin-powerpc.deb) …
Setting up ruby (1.6.6-2) …
-> ruby
dyld: ruby Undefined symbols:
_dlclose
_dlerror
_dlopen
_dlsym

Now ruby does not work
Looks like I am going from bad to worse.

···


Jim Freeze
If only I had something clever to say for my comment…
~

[snip]

Well this sucks. I was thinking that maybe it was a flat-namespace issue so
I undid libruby-frmwk. This broke a few things but not irb. I have a few
other things to try to see if I can reproduce your problem. Back soon.

···

On 7/21/02 5:52 PM, “Jim Freeze” jfreeze@freebsdportal.com wrote:

Well, since that did not work, tried to install again via fink and
I get:


Laws are the spider’s webs which, if anything small falls into them they
ensnare it, but large things break through and escape. -Solon, statesman
(c. 638-c558 BCE)

Ok, here is what I did and what I found:

I erased ruby from /usr/local and re-installed it with Fink. Then I tried
irb and it worked fine. That probably was not what you wanted to hear, Jim.

I did pick up a potential clue, though. Fink told me that there were
unsatisfied dependencies and took it’s suggestion for how to resolve them.
It installed not only readline but readline.shlibs. Maybe it missed that on
your install somehow.

Sorry I can’t provide more help. I hate it when I get “It works for me” type
posts but I think you might be best served just to sudo rm -rf your /sw
hierarchy and either install ruby in /usr/local/… from the tarball or
re-install Fink.

···

On 7/21/02 8:00 PM, “Chris Gehlker” gehlker@fastq.com wrote:

On 7/21/02 5:52 PM, “Jim Freeze” jfreeze@freebsdportal.com wrote:

Well, since that did not work, tried to install again via fink and
I get:

[snip]

Well this sucks. I was thinking that maybe it was a flat-namespace issue so
I undid libruby-frmwk. This broke a few things but not irb. I have a few
other things to try to see if I can reproduce your problem. Back soon.


There is, nevertheless, a certain respect and a general duty of humanity
that ties us, not only to beasts that have life and sense, but even to
trees and plants. -Michel de Montaigne, essayist (1533-1592)

Ok, here is what I did and what I found:

I erased ruby from /usr/local and re-installed it with Fink. Then I tried
irb and it worked fine. That probably was not what you wanted to hear, Jim.

I did pick up a potential clue, though. Fink told me that there were
unsatisfied dependencies and took it’s suggestion for how to resolve them.
It installed not only readline but readline.shlibs. Maybe it missed that on
your install somehow.

Sorry I can’t provide more help. I hate it when I get “It works for me” type
posts but I think you might be best served just to sudo rm -rf your /sw
hierarchy and either install ruby in /usr/local/… from the tarball or
re-install Fink.

Hmm, re-installing fink seems kind of drastic. I just upgraded it yesterday
and got the CVS sources. Plus, I installed tetex today which took
about 5 hours and that worked fine.

There must be some way to break this problem down to find the cause.

Jim

···

On Mon, Jul 22, 2002 at 01:37:32PM +0900, Chris Gehlker wrote:

On 7/21/02 8:00 PM, “Chris Gehlker” gehlker@fastq.com wrote:

On 7/21/02 5:52 PM, “Jim Freeze” jfreeze@freebsdportal.com wrote:

Well, since that did not work, tried to install again via fink and
I get:

[snip]

Well this sucks. I was thinking that maybe it was a flat-namespace issue so
I undid libruby-frmwk. This broke a few things but not irb. I have a few
other things to try to see if I can reproduce your problem. Back soon.


There is, nevertheless, a certain respect and a general duty of humanity
that ties us, not only to beasts that have life and sense, but even to
trees and plants. -Michel de Montaigne, essayist (1533-1592)


Jim Freeze
If only I had something clever to say for my comment…
~

It sure is drastic if an install takes 5 hours. Sometimes I forget that not
everyone has a fast connection.

Is Ruby itself running again?

I kinda stuck if it isn’t. You could always try removing it with dselect a
reinstalling just Ruby.

If Ruby is running, then compare the results of:

% ruby -e ‘puts $:.join("\n")’ with wherever locate says that readline is.
If the location of readline is being missed, you can easily fix that with a
setenv RUBYLIB statement in your .tcshrc file. This is kind of a hack though
and it will break at higher safe levels.

···

On 7/21/02 10:21 PM, “Jim Freeze” jfreeze@freebsdportal.com wrote:

Hmm, re-installing fink seems kind of drastic. I just upgraded it yesterday
and got the CVS sources. Plus, I installed tetex today which took
about 5 hours and that worked fine.

There must be some way to break this problem down to find the cause.

Jim


When I was a boy I was told that anybody could become President. Now I’m
beginning to believe it. -Clarence Darrow, lawyer and author (1857-1938)

Hmm, re-installing fink seems kind of drastic. I just upgraded it yesterday
and got the CVS sources. Plus, I installed tetex today which took
about 5 hours and that worked fine.

There must be some way to break this problem down to find the cause.

Jim

It sure is drastic if an install takes 5 hours. Sometimes I forget that not
everyone has a fast connection.

Actually I have a fast connection, tetex is just a monstor to build.

Is Ruby itself running again?

I took the drastic route, but I also changed my shell (I can’t remember
why I did this) from bash back to tcsh. All works now. I think the
problem had something to do with me using bash and possibly not sourcing
the fink /sw/.cshrc (or whatever it is) file.

Thanks much for your help.

···

On Mon, Jul 22, 2002 at 11:34:04PM +0900, Chris Gehlker wrote:

On 7/21/02 10:21 PM, “Jim Freeze” jfreeze@freebsdportal.com wrote:


Jim Freeze
If only I had something clever to say for my comment…
~

I’m sorry you had to loose all that work.

Ever since I discovered ‘smart completion’ in tcsh, enabled by adding
set complete = enhance
To your .tcshrc file, bash has felt brain damaged to me. I hear that for
folks who really like bash, zsh is very similar but allows you to turn on
the interactive goodness of tcsh.

···

On 7/22/02 8:08 AM, “Jim Freeze” jfreeze@freebsdportal.com wrote:

I took the drastic route, but I also changed my shell (I can’t remember
why I did this) from bash back to tcsh. All works now. I think the
problem had something to do with me using bash and possibly not sourcing
the fink /sw/.cshrc (or whatever it is) file.


Every society honors its live conformists and its dead troublemakers.
-Mignon McLaughlin, author

I’m sorry you had to loose all that work.

Ever since I discovered ‘smart completion’ in tcsh, enabled by
adding
set complete = enhance
To your .tcshrc file, bash has felt brain damaged to me. I hear
that for
folks who really like bash, zsh is very similar but allows you to
turn on
the interactive goodness of tcsh.

Getting a bit OT here, but yes, zsh’s programmability with respect to
completion is very featureful (if somewhat syntactically daunting).

···

=====

Use your computer to help find a cure for cancer: http://members.ud.com/projects/cancer/

Yahoo IM: michael_s_campbell


Do You Yahoo!?
Yahoo! Health - Feel better, live better

I took the drastic route, but I also changed my shell (I can’t remember
why I did this) from bash back to tcsh. All works now. I think the
problem had something to do with me using bash and possibly not sourcing
the fink /sw/.cshrc (or whatever it is) file.

I’m sorry you had to loose all that work.

Ever since I discovered ‘smart completion’ in tcsh, enabled by adding
set complete = enhance

Hmm, I haven’t tried complete = enhance. What functionality does it provide over
set autolist
set autocorrect
set autoexpand

Also, what does tcsh completion do that bash completion doesn’t do?
My complaint with tcsh is the vi binding. When I search for something
with the esc / , it comes up empty and I have to follow that
with a shift N. In bash, I get a match without extra keystrokes and
’n’ gives me reverse searching. Is there a way to change this in tcsh?

Jim

···

On Tue, Jul 23, 2002 at 01:49:40AM +0900, Chris Gehlker wrote:

On 7/22/02 8:08 AM, “Jim Freeze” jfreeze@freebsdportal.com wrote:

To your .tcshrc file, bash has felt brain damaged to me. I hear that for
folks who really like bash, zsh is very similar but allows you to turn on
the interactive goodness of tcsh.

Every society honors its live conformists and its dead troublemakers.
-Mignon McLaughlin, author


Jim Freeze
If only I had something clever to say for my comment…
~

Hmm, I haven’t tried complete = enhance. What functionality does it provide
over
set autolist
set autocorrect
set autoexpand

My favorites are that it silently fixes case errors and encourages
meaningful file names. The former is important for Mac babies who can’t
understand why the computer shouldn’t just DWIM when it comes to case. For
an example of the later, m-res-f-ru-j will expand to
My_Resume_for_Ruby_Jobs.

Also, what does tcsh completion do that bash completion doesn’t do?
My complaint with tcsh is the vi binding. When I search for something
with the esc / , it comes up empty and I have to follow that
with a shift N. In bash, I get a match without extra keystrokes and
’n’ gives me reverse searching. Is there a way to change this in tcsh?

There’s probably a way but I’m no help. I have open set up pipe
to CodeWarrior editor. We become slaves to editors that we have
"mastered".

This is getting a little OT for the list but I’d be happy to continue in
private mail.

···

On 7/22/02 10:59 AM, “Jim Freeze” jfreeze@freebsdportal.com wrote:

Every society honors its live conformists and its dead troublemakers.
-Mignon McLaughlin, author