-1

无法打开 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>'
4

1 回答 1

0

编译 Ruby 时需要安装 readline 库。

关注这个博客:

修复-readline-for-the-ruby-on-rails-console

于 2013-09-16T12:16:40.823 回答