no such file to load -- readline

安装rails后进入控制台出现如题错误:

  1. /usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError)  
  2.         from /usr/local/lib/ruby/1.8/irb/completion.rb:10  
  3.         from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `require'  
  4.         from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `load_modules'  
  5.         from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `each'  
  6.         from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `load_modules'  
  7.         from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup'  
  8.         from /usr/local/lib/ruby/1.8/irb.rb:54:in `start'  
  9.         from /usr/local/bin/irb:13 



1 rvm pkg installreadline
2 rvm remove 1.9.2
3

rvm install1.9.2 --with-readline-dir=$rvm_path/usr



这中方法比较慢  还有一种比较好的方法,实践可用

On Debian/Ubuntu:

apt-get install libreadline-dev

Or on RHEL/CentOS, try

yum install readline-devel
  然后进入./rvm/src/ruby_path/ext /readline   ruby extconf.rb   

make && make install

然后就ok了

阅读更多
文章标签: file rails ruby each
个人分类: gem
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

no such file to load -- readline

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭