ruby 1.9 irb rails console不能用readline问题
ruby 1.9 irb rails console不能用readline问题问题现象就是
引用
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/
问题是我一进行到这一步就有问题
Ruby代码1.$ cd $HOME/.rvm/src/ruby-1.9.2-p0/ext/readline
2.$ ruby extconf.rb -- --with-readline-dir="$HOME/.rvm/usr"
$ 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代码1.ruby extconf.rb -- --with-readline-dir='/home/ra/.rvm/usr/include/readline'
ruby extconf.rb -- --with-readline-dir='/home/ra/.rvm/usr/include/readline'一个是没有装
Ruby代码1.sudo aptitude install libreadline-dev
页:
[1]