`require': no such file to load -- readline (LoadError)
When I type rails console, I get this error:
[root@trebek2 readline]# /usr/local/bin/myapp/script/console
Loading development environment.
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError)
from /usr/local/lib/ruby/1.8/irb/completion.rb:10
from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `require'
from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `load_modules'
from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `each'
from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `load_modules'
from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup'
from /usr/local/lib/ruby/1.8/irb.rb:54:in `start'
from /usr/local/bin/irb:13
solution:
My solution on Ubuntu Linux is:
* apt-get install libncurses5-dev
apt-get install libreadline5-dev
* make the readline module for ruby,
i.e. go to the <ruby_src>/ext/readline,
ruby extconf.rb #generate valid makefile
make
make install