9

My version of ruby was compiled with editline (on os x) and I miss the features of readline in irb.

How do I recompile ruby with readline support?

samg
  • 3,496
  • 1
  • 25
  • 26

2 Answers2

13
  1. Install readline to /usr/local
  2. Recompile ruby from scratch and use the --with-readline-dir=/usr/local switch

or if you have downloaded the ruby sources earlier and built it by hand,

  1. Go to the ext/readline folder of your ruby source tree
  2. Type ruby extconf.rb and then run the make && make install procedure for ruby.
Tamas Mezei
  • 899
  • 6
  • 9
  • Check out http://bogojoker.com/readline/ for more information on readline in general. – Jonathan R. Wallace Apr 15 '10 at 18:52
  • Notably the 2nd set requires you to have ruby installed, which may mean compiling and installing ruby once without readline, only to recompile and reinstall again it *with* readline. Recursive dependencies suck. – Joe Atzberger Jan 14 '13 at 21:35
2

There's also a pure ruby readline.

Adrian Toman
  • 11,316
  • 5
  • 48
  • 62
rogerdpack
  • 62,887
  • 36
  • 269
  • 388