ruby 1.9 irb rails console不能用readline问题_Ruby_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > Ruby > ruby 1.9 irb rails console不能用readline问题

ruby 1.9 irb rails console不能用readline问题

 2011/11/24 10:44:41  夜鸣猪  http://hlee.iteye.com  我要评论(0)
  • 摘要:问题现象就是引用Readlinewasunabletoberequired,ifyouneedcompletionorhistoryinstallreadlinethenreinstalltheruby.Youmayfollow'rvmnotes'fordependenciesand/orreadthedocspagehttps://rvm.beginrescueend.com/packages/readline/.Besureyou'rvmremoveX;rvminstallX'tore
  • 标签:rails Ruby 问题
问题现象就是

引用
Readline was unable to be required, if you need completion or history install readline then reinstall the ruby.
You may follow 'rvm notes' for dependencies and/or read the docs page https://rvm.beginrescueend.com/packages/readline/ . Be sure you 'rvm remove X ; rvm install X' to re-compile your ruby with readline support after obtaining the readline libraries.



标准的解决办法是
https://rvm.beginrescueend.com/packages/readline/

问题是我一进行到这一步就有问题
$ cd $HOME/.rvm/src/ruby-1.9.2-p0/ext/readline
$ ruby extconf.rb -- --with-readline-dir="$HOME/.rvm/usr"


引用checking for tgetnum() in -lncurses... yes
checking for readline/readline.h... yes
checking for readline/history.h... yes
checking for readline() in -lreadline... no


后来发现两个问题:
1. 路径
ruby extconf.rb -- --with-readline-dir='/home/ra/.rvm/usr/include/readline'


一个是没有装
sudo aptitude install libreadline-dev


发表评论
用户名: 匿名