Wednesday, May 30, 2007

rails script/console problem on ubuntu

shell> ruby 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 `load_modules'

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

Check them out:

1.) Download ruby source.
Download Here
2.) Extract the tar file.
tar -xvf ruby-1.8.5-p12.tar.gz
3.) Change to that directory
cd ruby-1.8.5-p12.tar.gz
4.) Type these commands.
sudo make install
5.) Install readline and ncurses.
apt-get install libncurses5-dev libreadline5-dev
6.) go back to the folder ruby source folder.
7.) Type these commands
cd ext
cd readline
ruby extconf.rb
sudo make install

Thats it. The console bug no longer appears.

No comments :