Skip to content

How to check that Ruby is built with Readline support

Duncan Holm edited this page May 21, 2025 · 3 revisions

Try this in the terminal:

ruby -r readline -e 'puts defined?(Readline) && Readline.name == "Readline" && !/editline/i.match?(Readline::VERSION)'

It should output true. If not:

  • When your Ruby is 3.3 or newer, ensure the gem readline-ext is installed (and is in Gemfile).
  • Make sure your distribution's package corresponding to libreadline-dev is installed and rebuild Ruby (possibly with additional options).
Clone this wiki locally