Use rbenv-readline plugin to ensure Ruby is compiled with readline.