升级ruby和rails后进入script/consle出现:
复制代码 代码如下:
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError) 
        from /usr/local/lib/ruby/1.8/irb/completion.rb:10 
        from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `require' 
        from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `load_modules' 
        from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `each' 
        from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `load_modules' 
        from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup' 
        from /usr/local/lib/ruby/1.8/irb.rb:54:in `start' 
        from /usr/local/bin/irb:13 

解决办法:

第一步:确认是否安装了libncurses5-dev libreadline5-dev ,如果没有安装,就用 
复制代码 代码如下:
   sudo apt-get install libncurses5-dev libreadline5-dev 进行安装 

第二步: 
复制代码 代码如下:
cd /usr/src/ruby-1.8.7/ext/readline 
ruby extconf.rb 
make 
sudo make install  

华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com