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:
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.
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
–
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)
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.
–
–
Jim Freeze
If only I had something clever to say for my comment…
~
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.
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)
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.
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)
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:
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.
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:
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.
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
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).
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:
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.