Forum: Ruby Broken Console

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2b404bb55d9b5dc78841795c4b731771?d=identicon&s=25 Damien Timewell (idlefingers)
on 2006-05-04 13:22
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
37ee5fa90f5eaeef62553629382497f7?d=identicon&s=25 Leslie Viljoen (Guest)
on 2006-05-04 14:00
(Received via mailing list)
On 5/4/06, Damien Timewell <mail@damientimewell.com> 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
2b404bb55d9b5dc78841795c4b731771?d=identicon&s=25 Damien Timewell (idlefingers)
on 2006-05-04 15:02
Leslie Viljoen 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.. :(
2c80e1b0837eec76d38d4f7fa1c15e87?d=identicon&s=25 Michael Gorsuch (Guest)
on 2006-05-04 15:08
(Received via mailing list)
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.
2c80e1b0837eec76d38d4f7fa1c15e87?d=identicon&s=25 Michael Gorsuch (Guest)
on 2006-05-04 15:11
(Received via mailing list)
Sorry.  I meant Darwin Ports.  Not fink.
37ee5fa90f5eaeef62553629382497f7?d=identicon&s=25 Leslie Viljoen (Guest)
on 2006-05-04 22:24
(Received via mailing list)
On 5/4/06, Michael Gorsuch <michael.gorsuch@gmail.com> 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)
This topic is locked and can not be replied to.