When trying to install ruby 1.9.2 on Ubuntu 10.04 (64-bit), I get the following error after performing the following steps:
- Install Dependencies
- ./configure to create make file
- Make
- Make Install
- Make Clean
- ruby -ropenssl -rzlib -rreadline -e "puts :Hello" (This should output 'hello' if all is well).,
Instead of outputting hello, I get this:
require: no such file to load -- readline`
After searching online, I find this solution: Blockquote
If you’ve compiled Ruby from source, you might get this error when executing script/console:
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError) One way of fixing this is to compile readline, which is distributed along with the Ruby source:
cd /opt/src/ruby-1.8.5-p2/ext/readline
ruby extconf.rb
make
sudo make install
This totally worked for me. My question is, why didn't ruby compile this to begin with? Did I forget some sort of config option?