How do I compile Readline support into Ruby

独自空忆成欢 提交于 2019-12-22 04:25:22

问题


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:


  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.



回答2:


There's also a pure ruby readline.



来源:https://stackoverflow.com/questions/1781518/how-do-i-compile-readline-support-into-ruby

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!