The ruby IRB comes with tab completion. Here’s how to enable it –
Create a file (if it doesn’t already exist) in your home directory called “.irbrc”. In it, cut and paste the following lines –
IRB.conf[:AUTO_INDENT] = true
IRB.conf[:USE_READLINE] = true
IRB.conf[:LOADMODULES] = [] unless IRB.conf.key?(:LOADMODULES)
unless IRB.conf[:LOAD_MODULES].include?(‘irb/completion’)
IRB.conf[:LOAD_MODULES]