How do I compile Readline support into Ruby
Asked Answered
A

2

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?

Aslant answered 23/11, 2009 at 7:4 Comment(0)
G
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.
Globefish answered 23/11, 2009 at 7:11 Comment(2)
Check out bogojoker.com/readline for more information on readline in general.Lawlor
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.Clinician
P
2

There's also a pure ruby readline.

Pythia answered 27/1, 2010 at 5:0 Comment(1)
google's first result for "pure ruby readline" was the right place.Pythia

© 2022 - 2024 — McMap. All rights reserved.