It was ruining all my mood and concentration when i was trying some sample ruby code in irb and again and again i had to retype the things because the arrow keys were not working there. I searched the problem on net and found that i need to have readline library on my linux and in ruby as well. Now the point is readline should be available on the linux before you compile ruby so as you can give the readline option while compiling ruby. BUT we have ruby already installed !! Now What ?
Now, first you will need to install system based readline libraries as
[source:ruby]
sudo apt-get install libreadline5 libreadline5-dev
[/source]
If you are not able to install linux based readline with the above method the refer this for more details.
Now you will need to compile the ruby based readline interface to let you readline library available in irb.
Do it by this…
[source:ruby]
cd /usr/local/src/ruby-1.8.6/ext/readline
sudo ruby extconf.rb
sudo make
sudo make install
[/source]
thats it, all done!!
Try your tips on arrow keys in irb, it should work now.
enjoy!!


Hi
Hey You are a ruby people and you are using php for your ruby site if we ruby people will not promote Ruby How will ruby SPREAD ?
Hey Jeet,
I hope i will get time to switch on to Mephisto or else soon !
Hi,
Nice blog!
Try http://www.rubyinside.com/wirble-tab-completion-and-syntax-coloring-for-irb-336.html for more cool stuff on IRB - output coloring and tab completion
PS: I read that you are a .NET convert - dude, you’ve converted pretty well
Maku
Thanks Maku!!
thats really useful gem for irb.
Thanks for this post ! It saved me.
Especially this line:
sudo apt-get install libreadline5 libreadline5-dev