Strange error with script/console

Hello,

I get this:
$ ./script/console
Loading development environment.
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such
file to load -- readline (LoadError)
...

found a LOT of solutions via google, like
$ apt-get install libncurses5-dev libreadline5-dev

but since I use RedHat this doesn't work for me.
also tried
$ yum install ncurses-devel readline-devel
without success (ncurses-devel worked, readline-devel failed)

Does anyone know what I could do?
Is it necessary to recompile ruby? :frowning:

Thanks in advance,
Paul

By the way this was the 70,000 message :smiley:

Hi,

but since I use RedHat this doesn't work for me.

even i faced same problem, but not in RedHat OS, but solaris OS.

Is it necessary to recompile ruby? :frowning:

I assume you will be having the source of ruby compilation, say after
un-taring ruby-1.8.5.tgz you will get a directory with the name
ruby-1.8.5, get into this directory. Type the following command
"find . -name readline.so". If you can find this file under that
directory, this means make install was not successful. So, you can try
one more time make install (not completely recompiling). And even
after this din't solve your problem means, as you said you can install
readline (library, plz don't install readline-devel) and necessary
dependency this should solve the problem. ReadLine is library used
for reading data from command line.

Thanks,
Regards,
Raghu KUmar K

Hi!

Thank you very much for your help.

I have a directory like /root/ruby-1.8.6-p110/
I don't have any readline.so, but a directory liek /root/ruby-1.8.6-
p110/ext/readline/
Inside there are also makefiles and stuff but executing them does not
work ("make:nothing to be done for all" etc.)

I also downloaded readline 5.2,
./configure works,
./make gives me
test -d shlib || mkdir shlib
( cd shlib ; make all )
make[1]: Entering directory `/root/readline-5.2/shlib'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/readline-5.2/shlib'
after ./make install I still get the error with script/console.. so I
guess there is still something wrong

Thanks in advance,
Paul

after ./make install I still get the error with script/console.. so I
guess there is still something wrong

Hi ,
I don't know which platform you are in. I will assume, you are using
Linux :slight_smile:
So, once you install this readline library say for example, you
installed readline library under
/home/test/local/lib/ folder. Then you have to put this path in your
LD_LIBRARY_PATH environment variable.
like this..

export LD_LIBRARY_PATH=/home/test/local/lib:$LD_LIBRARY_PATH

ONE more thins is you can put this in your environment.rb file then
start the console, so in environment.rb u can do this,
$:.push('/home/test/local/lib/') .

Hope it works, cheers.

Sorry, if it's not helping, but this is what i faced and this is how i
solved it. DOn't know what's wrong in your case.

Thanks,
Regards,
Raghu KUmar K