I cannot find a resolution to this problem and figured someone here
probably can tell me what I need to do to fix it; there are so many
intelligent, learned and helpful people here. (Thanks in advance.)
I’ve searched Google and run the MacOS Software Updates, (I’m on a newly
purchased system, recently upgraded from Leopard to Snow Leopard). I
also reinstalled Xcode. Then I updated all my gems (though I’m not sure
they all worked right – should I install them as root or myself?). I’m
a newbie to Ruby and to the Mac, (though I’ve run many other Unix
systems), so I’m not sure I’ve checked everything… (apparently not).
Any call to ‘gets’ results in the error, below, (I also pasted version
info)
$ irb --simple-prompt
person = gets
Errno::ENOENT: No such file or directory - --readline
from (irb):1:in `gets’
from (irb):1
Any call to ‘gets’ results in the error, below, (I also pasted version
info)
$ irb --simple-prompt
person = gets
Errno::ENOENT: No such file or directory - --readline
�from (irb):1:in `gets’
�from (irb):1
It appears that somewhere along the line you have a program invoking
another program with the argument --readline, but for some reason it’s
interpreting that as a filename instead of a switch. I’m not sure
where that is happening, though.
Any call to ‘gets’ results in the error, below, (I also pasted version
info)
$ irb --simple-prompt
person = gets
Errno::ENOENT: No such file or directory - --readline
�from (irb):1:in `gets’
�from (irb):1
It appears that somewhere along the line you have a program invoking
another program with the argument --readline, but for some reason it’s
interpreting that as a filename instead of a switch. I’m not sure
where that is happening, though.
AHH! THAT’S IT!
I ran the command:
$ find / -xdev -type f -exec grep -l readline {} ;
… then checked all the files it indicated contained the word
“readline” inside, and found a file (which I did not create), named
“.irbrc”, which contains (among other things), the lines:
I ran the command:
$ find / -xdev -type f -exec grep -l readline {} ;
… then checked all the files it indicated contained the word
“readline” inside, and found a file (which I did not create), named
“.irbrc”, which contains (among other things), the lines:
When I renamed that file, my irb sessions began to work correctly!
Thanks for the help. I doubt I would have found it without the tips in
the right direction!
Thank you. That seems to be what caused my problem. I deleted the .irbrc
(it was a link on my system), and irb works correctly. The date stamp on
the files seems to be when I installed some vi/vim enhancement, (I do
not recall the package name). Have you installed any vi or vim packages
recently?
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.