我如何将 Readline 支持编译到 Ruby 中 [英] How do I compile Readline support into Ruby

查看:34
本文介绍了我如何将 Readline 支持编译到 Ruby 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 ruby​​ 版本是用 editline(在 os x 上)编译的,我错过了 irbreadline 的功能.

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?

推荐答案

  1. readline 安装到 /usr/local
  2. 从头开始重新编译 ruby​​ 并使用 --with-readline-dir=/usr/local 开关
  1. Install readline to /usr/local
  2. 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,

  1. 转到 ruby​​ 源代码树的 ext/readline 文件夹
  2. 输入 ruby extconf.rb 然后运行 ​​make &&make install ruby​​ 程序.
  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.

这篇关于我如何将 Readline 支持编译到 Ruby 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆