# Strange error with script/console

**URL:** <https://www.ruby-forum.com/t/strange-error-with-script-console/196519>\
**Category:** Rails\
**Created:** [November 17, 2007, 5:53pm UTC](https://www.ruby-forum.com/t/strange-error-with-script-console/196519 "2007-11-17T17:53:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bbe5ce/32.png) [@paul](https://www.ruby-forum.com/u/paul)\
**Post date:** [November 17, 2007, 5:53pm UTC](https://www.ruby-forum.com/t/strange-error-with-script-console/196519/1 "2007-11-17T17:53:30Z")

</div>

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? ☹

Thanks in advance,  
Paul

---

<div class="post-metadata">

**Author:** ![paul](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bbe5ce/32.png) [@paul](https://www.ruby-forum.com/u/paul)\
**Post date:** [November 17, 2007, 5:54pm UTC](https://www.ruby-forum.com/t/strange-error-with-script-console/196519/2 "2007-11-17T17:54:40Z")

</div>

By the way this was the 70,000 message 😃

---

<div class="post-metadata">

**Author:** ![paul](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bbe5ce/32.png) [@paul](https://www.ruby-forum.com/u/paul)\
**Post date:** [November 18, 2007, 4:27am UTC](https://www.ruby-forum.com/t/strange-error-with-script-console/196519/3 "2007-11-18T04:27:39Z")

</div>

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? ☹

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

---

<div class="post-metadata">

**Author:** ![paul](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bbe5ce/32.png) [@paul](https://www.ruby-forum.com/u/paul)\
**Post date:** [November 18, 2007, 4:26pm UTC](https://www.ruby-forum.com/t/strange-error-with-script-console/196519/4 "2007-11-18T16:26:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![paul](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bbe5ce/32.png) [@paul](https://www.ruby-forum.com/u/paul)\
**Post date:** [November 20, 2007, 1:14pm UTC](https://www.ruby-forum.com/t/strange-error-with-script-console/196519/5 "2007-11-20T13:14:13Z")

</div>

> 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 🙂  
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
