我在我的Opensuse上安装了ruby 2.0.0和rails 4.0.0但是rails控制台不起作用。 我有此错误消息:
/home/zellou_i/.rubies/ruby-2.0.0-p247/lib64/ruby/2.0.0/irb/completion.rb:9:in `require': cannot load such file -- readline (LoadError)
from /home/zellou_i/.rubies/ruby-2.0.0-p247/lib64/ruby/2.0.0/irb/completion.rb:9:in `<top (required)>'
from /home/zellou_i/.gem/ruby/2.0.0/gems/railties-4.0.0/lib/rails/commands/console.rb:3:in `require'
from /home/zellou_i/.gem/ruby/2.0.0/gems/railties-4.0.0/lib/rails/commands/console.rb:3:in `<top (required)>'
from /home/zellou_i/.gem/ruby/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:53:in `require'
from /home/zellou_i/.gem/ruby/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:53:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
我不明白,我安装了readline但他无法加载它。
答案 0 :(得分:2)
Ruby需要使用readline支持进行编译。确保安装了libreadline6及其dev头文件(特定于debian的软件包,适应suse),然后重新编译你的ruby。