# Broken Console

**URL:** <https://www.ruby-forum.com/t/broken-console/94475>\
**Category:** Ruby\
**Created:** [May 4, 2006, 1:22pm UTC](https://www.ruby-forum.com/t/broken-console/94475 "2006-05-04T13:22:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![idlefingers](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/898d66/32.png) [@idlefingers](https://www.ruby-forum.com/u/idlefingers)\
**Post date:** [May 4, 2006, 1:22pm UTC](https://www.ruby-forum.com/t/broken-console/94475/1 "2006-05-04T13:22:23Z")

</div>

I just tried to boot up my app’s console and it seems either something  
is broken or I’ve done something wrong?

Here’s what I’m doing…

First i cd to my project then run the command ‘script/console  
development’ only to get the following error:

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:218:in`require’  
from /usr/lib/ruby/1.8/irb/init.rb:218:in `load_modules' from /usr/lib/ruby/1.8/irb/init.rb:216:in`each’  
from /usr/lib/ruby/1.8/irb/init.rb:216: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

Does anyone know what’s going wrong and what could be done to fix it?

Thanks for any help,  
Damien

---

<div class="post-metadata">

**Author:** ![idlefingers](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/898d66/32.png) [@idlefingers](https://www.ruby-forum.com/u/idlefingers)\
**Post date:** [May 4, 2006, 2:00pm UTC](https://www.ruby-forum.com/t/broken-console/94475/2 "2006-05-04T14:00:58Z")

</div>

On 5/4/06, Damien T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> /usr/lib/ruby/1.8/irb/completion.rb:10:in `require’: No such file to  
> Does anyone know what’s going wrong and what could be done to fix it?  
> Looks like you are missing the readline library.

My Debian box has this package in Apt:  
libreadline-ruby1.8 - Readline interface for Ruby 1.8

The Windows installer seems to include readline by default.

L

---

<div class="post-metadata">

**Author:** ![idlefingers](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/898d66/32.png) [@idlefingers](https://www.ruby-forum.com/u/idlefingers)\
**Post date:** [May 4, 2006, 3:02pm UTC](https://www.ruby-forum.com/t/broken-console/94475/3 "2006-05-04T15:02:58Z")

</div>

Leslie V. wrote:

> Looks like you are missing the readline library.
> 
> My Debian box has this package in Apt:  
> libreadline-ruby1.8 - Readline interface for Ruby 1.8
> 
> The Windows installer seems to include readline by default.

Im on OS X and when I was installing everything, readline was one of the  
first.

I tried installing it again, but it seems to make no difference. I think  
somethings gone wrong with my install because i also installed lighttpd  
which has stopped working also.

I can find anything online about un-installing everything and starting  
fresh and Im scarred that it’s starting to look like doing a fresh  
install of my OS is going to be the only fix… ☹

---

<div class="post-metadata">

**Author:** ![idlefingers](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/898d66/32.png) [@idlefingers](https://www.ruby-forum.com/u/idlefingers)\
**Post date:** [May 4, 2006, 3:11pm UTC](https://www.ruby-forum.com/t/broken-console/94475/4 "2006-05-04T15:11:40Z")

</div>

Sorry. I meant Darwin Ports. Not fink.

---

<div class="post-metadata">

**Author:** ![idlefingers](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/898d66/32.png) [@idlefingers](https://www.ruby-forum.com/u/idlefingers)\
**Post date:** [May 4, 2006, 3:08pm UTC](https://www.ruby-forum.com/t/broken-console/94475/5 "2006-05-04T15:08:36Z")

</div>

You may consider installing ruby via fink or compiling from source.  
That  
would give you a new ruby environment to work with, without stressing  
about  
an OS rebuild.

---

<div class="post-metadata">

**Author:** ![idlefingers](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/898d66/32.png) [@idlefingers](https://www.ruby-forum.com/u/idlefingers)\
**Post date:** [May 4, 2006, 10:24pm UTC](https://www.ruby-forum.com/t/broken-console/94475/6 "2006-05-04T22:24:24Z")

</div>

On 5/4/06, Michael G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> You may consider installing ruby via fink or compiling from source. That  
> would give you a new ruby environment to work with, without stressing  
> about  
> an OS rebuild.

If you have a bit of time you should try and figure out what happened  
before  
you reload in case it happens again.

Sorry, I don’t have an apple, so you may have to extrapolate what I do  
here.

Can you start irb apart from the Rails console? If so, or if you can run  
another  
Ruby program, try a “puts $LOAD\_PATH” and see where Ruby is searching.

Here’s how I search for the library in the filesystem on Linux:  
lesliev@mel:/usr/lib/ruby$ find -iname readline\*  
./1.8/i486-linux/readline.so

So Ruby can load /usr/lib/ruby/1.8/i486-linux/readline.so because  
/usr/lib/ruby/1.8/i486-linux  
is in the $LOAD\_PATH

You can see what has actually been loaded with $LOADED\_FEATURES - and  
you  
can get a list list of all these useful variables by calling  
“global\_variables” - which I in  
turn found with “private\_methods”. Gotta love irb!

(or I’m sure you could also read a good Ruby reference)
