# "\`require': no such file to load" while running script/console

**URL:** <https://www.ruby-forum.com/t/require-no-such-file-to-load-while-running-script-console/118784>\
**Category:** Rails\
**Created:** [October 30, 2007, 10:11pm UTC](https://www.ruby-forum.com/t/require-no-such-file-to-load-while-running-script-console/118784 "2007-10-30T22:11:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Onno\_van\_der\_Straat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/d6d6ee/32.png) [@Onno\_van\_der\_Straat](https://www.ruby-forum.com/u/Onno_van_der_Straat)\
**Post date:** [October 30, 2007, 10:11pm UTC](https://www.ruby-forum.com/t/require-no-such-file-to-load-while-running-script-console/118784/1 "2007-10-30T22:11:24Z")

</div>

Hi,  
I setting up a new server on Linux server running SuSE Linux  
Entreprise Server 10.  
While trying to run script/console I get an error that I don’t  
understand.  
Any pointers to fix this will be greatly appreciated as really between  
a rock and a hard place with RoR.  
Thans and Regards,  
Onno

user@epf:~\> ruby -v  
ruby 1.8.6 (2007-03-13 patchlevel 0) [x86\_64-linux]  
user@epf:~\> rails -v  
Rails 1.2.4  
user@epf:~\> rails test  
create  
create app/controllers  
… (lines deleted)  
create log/test.log  
user@epf:~\> cd test  
user@epf:~/test\> ruby script/console  
Loading development environment.  
/usr/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError) from /usr/lib/ruby/1.8/irb/completion.rb:10 from /usr/lib/ruby/1.8/irb/init.rb:252:in`require’  
from /usr/lib/ruby/1.8/irb/init.rb:252:in `load_modules' from /usr/lib/ruby/1.8/irb/init.rb:250:in`each’  
from /usr/lib/ruby/1.8/irb/init.rb:250:in `load_modules' from /usr/lib/ruby/1.8/irb/init.rb:21:in`setup’  
from /usr/lib/ruby/1.8/irb.rb:54:in `start’  
from /usr/bin/irb:13  
user@epf:~/test\>

---

<div class="post-metadata">

**Author:** ![Onno\_van\_der\_Straat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/d6d6ee/32.png) [@Onno\_van\_der\_Straat](https://www.ruby-forum.com/u/Onno_van_der_Straat)\
**Post date:** [October 31, 2007, 12:40am UTC](https://www.ruby-forum.com/t/require-no-such-file-to-load-while-running-script-console/118784/2 "2007-10-31T00:40:27Z")

</div>

Looks like ruby wasn’t compiled with readline support. You should make  
sure you do have the readline library available and its development  
headers etc… When you compile ruby you can tell it where to look for  
the readline stuff.

Fred

---

<div class="post-metadata">

**Author:** ![Onno\_van\_der\_Straat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/d6d6ee/32.png) [@Onno\_van\_der\_Straat](https://www.ruby-forum.com/u/Onno_van_der_Straat)\
**Post date:** [October 31, 2007, 3:00pm UTC](https://www.ruby-forum.com/t/require-no-such-file-to-load-while-running-script-console/118784/3 "2007-10-31T15:00:35Z")

</div>

You are right, it turns out it wasn’t available on that distribution.

To be exact, a readline package was installed, but not the one that  
contained the missing file, which turned out to be readline.h, which I  
found out by recompiling the readline support:

The following shows that some readline package was installed:  
epf:/home/user/migration/soft # rpm -ivh readline-5.2-7.x86\_64.rpm  
warning: readline-5.2-7.x86\_64.rpm: Header V3 DSA signature: NOKEY,  
key ID 844c4360  
Preparing…  
########################################### [100%]  
package readline-5.2-7 is already installed  
epf:/home/user/migration/soft #

The following showed me the exact file that was missing: readline.h  
user@epf:~/migration/soft/ruby-1.8.6/ext/readline\> ruby extconf.rb  
checking for tgetnum() in -lncurses… yes  
checking for readline/readline.h… no  
checking for editline/readline.h… no

I was able to locate a RPM containing readline.h using  
[http://rpm.pbone.net](http://rpm.pbone.net):  
ftp://ftp.gwdg.de/pub/linux/misc/suser-jengelh/SUSE-10.2/x86\_64/readline-devel-5.2-7.x86\_64.rpm.

After installing that I could compile the readline support in Ruby  
with ruby extconf.rb:  
ruby extconf.rb (in /ruby-1.8.6/ext/readline)  
make  
sudo make install

So it turns out that for Rails on Linux server running SuSE Linux  
Entreprise Server 10 you need to install this manually.

Thanks and Regards,  
Onno
