Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I compile Readline support into Ruby

Tags:

ruby

readline

irb

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?

like image 622
samg Avatar asked Nov 23 '09 07:11

samg


2 Answers

  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.
like image 82
Tamas Mezei Avatar answered Sep 29 '22 22:09

Tamas Mezei


There's also a pure ruby readline.

like image 43
rogerdpack Avatar answered Oct 02 '22 22:10

rogerdpack