I just had to do a reinstall, and somehow something is missing. When I
try to run ruby script/console, I get the error message
in `require’: no such file to load – readline
Obviously, I left something out, but I’m not sure what or where to start
trying to get it fixed.
I know there are a lot of ruby experts here. Could some of you point me
in the right direction.
Sounds like you don’t have the readline library or ruby bindings.
First make sure you have the readline library itself (by whatever means
is most appropriate for your platform), and then build & install the
ruby bindings for that (assuming you have the source for ruby handing
it’s in ext/readline)
Sounds like you don’t have the readline library or ruby bindings.
First make sure you have the readline library itself (by whatever means
is most appropriate for your platform), and then build & install the
ruby bindings for that (assuming you have the source for ruby handing
it’s in ext/readline)
If I write a small program (x = readline; puts x), readline works. Is
there something else I need?
I had the exact same problem on a fresh install of Ubuntu. As Fred
mentioned, the readline libs are missing by default.
I stumbled for a while and got lucky with google… went something like
this but I can’t remember the exact steps…
apt-get install build_essential
apt-get install libncurses5-dev libreadline5-dev
download ruby 1.8.5 source,
edit the ext/setup file to statically import all libs that don’t
sound like microsoft ones (this step may not be needed but I did it
anyway)
run: configure, make, make install
download gems source from rubyforge
ruby setup.rb
gem install rails
Getting the debian/ubuntu mysql bindings to work with ruby was another
story entirely!
hope this helps
ilan
Michael S. wrote:
I just had to do a reinstall, and somehow something is missing. When I
try to run ruby script/console, I get the error message
in `require’: no such file to load – readline
Obviously, I left something out, but I’m not sure what or where to start
trying to get it fixed.
I know there are a lot of ruby experts here. Could some of you point me
in the right direction.
Slightly confusingly, there’s a difference between the IO#readline
method, which reads a line from an input device, and the readline
library which handles stuff like editing a command line, command history
etc…
You’re lacking the latter (given that require ‘readline’ fails).
When this happened to me the other day it was because I didn’t have all
the headers and so on for libreadline at the point where I built ruby.
You should be able to get libreadline and associated headers, and then
rebuild the ruby bindings for libreadline