问题
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?
回答1:
- Install
readlineto/usr/local - Recompile ruby from scratch and use the
--with-readline-dir=/usr/localswitch
or if you have downloaded the ruby sources earlier and built it by hand,
- Go to the
ext/readlinefolder of your ruby source tree - Type
ruby extconf.rband then run themake && make installprocedure for ruby.
回答2:
There's also a pure ruby readline.
来源:https://stackoverflow.com/questions/1781518/how-do-i-compile-readline-support-into-ruby