我如何将 Readline 支持编译到 Ruby 中 [英] How do I compile Readline support into Ruby
本文介绍了我如何将 Readline 支持编译到 Ruby 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的 ruby 版本是用 editline
(在 os x 上)编译的,我错过了 irb
中 readline
的功能.
My version of ruby was compiled with editline
(on os x) and I miss the features of readline
in irb
.
如何使用 readline
支持重新编译 ruby?
How do I recompile ruby with readline
support?
推荐答案
- 将
readline
安装到/usr/local
- 从头开始重新编译 ruby 并使用
--with-readline-dir=/usr/local
开关
- Install
readline
to/usr/local
- Recompile ruby from scratch and use the
--with-readline-dir=/usr/local
switch
或者如果您之前下载了 ruby 源代码并手动构建了它,
or if you have downloaded the ruby sources earlier and built it by hand,
- 转到 ruby 源代码树的
ext/readline
文件夹 - 输入
ruby extconf.rb
然后运行 make &&make install
ruby 程序.
- Go to the
ext/readline
folder of your ruby source tree - Type
ruby extconf.rb
and then run themake && make install
procedure for ruby.
这篇关于我如何将 Readline 支持编译到 Ruby 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文