无法打开rails控制台

时间:2013-09-16 12:05:00

标签: ruby-on-rails ruby ruby-on-rails-3

无法打开rails控制台,抛出以下错误

$ rails c

/home/#/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/completion.rb:9:in `require':   cannot load such file -- readline (LoadError)
from /home/#/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/completion.rb:9:in `<top (required)>'
from /home/#/.rvm/gems/ruby-2.0.0-p0@aer-ui/gems/railties-3.2.13/lib/rails/commands/console.rb:3:in `require'
from /home/#/.rvm/gems/ruby-2.0.0-p0@aer-ui/gems/railties-3.2.13/lib/rails/commands/console.rb:3:in `<top (required)>'
from /home/#/.rvm/gems/ruby-2.0.0-p0@aer-ui/gems/railties-3.2.13/lib/rails/commands.rb:38:in `require'
from /home/#/.rvm/gems/ruby-2.0.0-p0@aer-ui/gems/railties-3.2.13/lib/rails/commands.rb:38:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

1 个答案:

答案 0 :(得分:0)

编译Ruby时需要安装readline库。

关注此博客:

fixing-readline-for-the-ruby-on-rails-console