问题:
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in`require'':nosuchfiletoload--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
解决:
先安装两个包
apt-getinstalllibncurses5-devlibreadline5-dev
然后进入ruby源码包
cd~/MyCode/ruby-1.8.6-p111/ext/readline$
执行
rubyextconf.rb
make
sudomakeinstall
在次rubyscript/console,问题解决了。
早就听人说过ubuntu上安装rails会有问题,比如前几天就手动重新安装了gem[0.9.5],昨天也手动装了rails的两个pack的gem。我感觉还是自己对linux不熟悉。呵呵。这样的事情慢慢来,经验的东西积少成多。
下载本文示例代码
阅读(353) | 评论(0) | 转发(0) |