I did mention this in another thread, but (I think) think I've learned a
little more, and decided to start a new thread.
My problem is that after compiling Ruby 1.8.4 and installing it in place of
the Mandriva2006 packaged 1.8.2, the irb command line works differently in
that:
* there is no command history (and the up and down arrow just show garbage)
* the left and right arrow just show garbage
* previously I could paste multiple lines of code to the irb prompt and irb
automagically made sense of them, putting each on an individual line (with
leading irb prompt), and working fine. Now I have to paste lines
individually.
After a little research and a lucky clue/guess, I believe that the missing
functionality comes from readline, so I'm trying to make irb use
readline--and here's what I've tried or think I know:
* I'm guessing the missing functionality comes from readline
* there is a way to enable/disable readline in irb (or in ~/.irbrc, which
didn't exist until I created it)
* typing conf at the irb prompt shows me the configuration parameters that
can be set
* contrary to what it says in the first Programming Ruby book, there is no
conf.inf_ruby_mode (which may have affected readline--trying to set it gives
an error)
* conf.use_readline was set to false--
* changing it to true did not change the behavior described above
* stopping and restarting irb showed that a change was not
persistent--reverted to false
* creating ~/.irbrc and including the line "IRB.conf[:USE_READLINE] =
true" made the change persist, but the behavior still did not change
* just for kicks, without having any idea what I'm doing, I searched
through the configure file (you know, for the ./configure step) to see if
there is any reference to readline--there is not.
So, any hints? Because the behavior existed in the Mandriva2006 packaged Ruby
1.8.2, and since the behavior on other similar programs seems to make use of
readline, and I didn't uninstall readline when I uninstalled Ruby 1.8.2, I
have to believe readline is installed on my machine.
PS: I wouldn't think that readline is a cli command, but just for kicks I
typed "readline" at the prompt. It comes back with "bash: readline: command
not found". Then I grepped ps -el and don't find any evidence of a readline
process running. Again, I don't have any idea whether it should, I'm just
trying to confirm readline is installed. Oops, wait--I can check using
rpmdrake (or drakerpm)...well, son of a gun--rpm -q readline returns:
[rhk@s14 rhk]$ rpm -q readline
package readline is not installed
I guess I'll go install it, then see what happens. Will I have to reinstall
ruby?
Well, wait, doing a whatprovides shows:
[root@s14 /]# rpm -q --whatprovides readline
libreadline5-5.0-2mdk
Then, trying to:
* install libreadline5-5.0-2mdk (with rpmdrake) shows it is not available
* uninstall libreadline5-5.0-2md shows I could uninstall it
Both of which imply that it is already installed. Hmm, I probably don't
understand all I know here, so I think I'll:
* send this to the list, see if anybody else has some hints
* while I cogitate a little before trying anything
Maybe the rpm -q readline was the wrong thing to do, ahh but now trying
[root@s14 /]# rpm -q libreadline
package libreadline is not installed
I get a similar result. Maybe that's part of the problem--I think I'll try to
uninstall then reinstall libreadline.
Oops, don't think I want to do that, looks like rpmdrake would want to
uninstall most of my system because so many things depend on libreadline.
So, I'll send this and see if anybody has some suggestions.
Randy Kramer