I come from python background and am learning ruby. IPython is really awesome. I am new to ruby now, and wanted to have some sort of ipython things. As of now am having tough time, going along ruby lines. Seems to be slightly irritating, when pressing tab does not complete things. I hit upon this question and followed the first answer, with max upvotes.
It said to do require 'irb/completion'
I did the same, and got following error:
LoadError: cannot load such file -- readline
from /home/letsrock/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/letsrock/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/letsrock/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/letsrock/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from (irb):1
from /home/letsrock/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>'
I then tried require 'completion' which eventually led to the following error:
LoadError: cannot load such file -- completion
from /home/letsrock/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/letsrock/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from (irb):3
from /home/letsrock/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>'
Let me know whats wrong, i am using ubuntu 11.04.
Even if you try pry it will give errors. Ubuntu does not get along well with ruby, you need few extra libraries. Following is what you can do:
This shall fix it.