Updated

How to enable autocomplete and history of typed commands in Ruby/Rails irb console

Solution

Install the following gems

gem install bond
gem install hirb

Then create a file .irbrc in your home folder and add the following

require 'bond'
require 'hirb'

ARGV.concat ["--readline", "--prompt-mode", "simple"]
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb_history"

Bond.start
Hirb.enable
Rails.application.eager_load! # Get all Models in [TAB]
ActiveRecord::Base.logger.level = 1 # Avoid log in Rails console

That’s it, press [TAB] for command autocomplete or up/down arrow to bring the history of typed commands!