Broken Console

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:inrequire’
from /usr/lib/ruby/1.8/irb/init.rb:218:in load_modules' from /usr/lib/ruby/1.8/irb/init.rb:216:ineach’
from /usr/lib/ruby/1.8/irb/init.rb:216:in load_modules' from /usr/lib/ruby/1.8/irb/init.rb:21:insetup’
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

On 5/4/06, Damien T. [email protected] 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

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… :frowning:

Sorry. I meant Darwin Ports. Not fink.

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.

On 5/4/06, Michael G. [email protected] 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)