0

当我尝试使用“rails server --debugger”在调试器模式下运行 rails server 时。我在控制台上收到以下错误。

/home/navyug/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/ext/module.rb:36:in `const_missing': uninitialized constant Debugger::LocalInterface::Readline (NameError)
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:55:in `block (2 levels) in initialize'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:53:in `each'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:53:in `block in initialize'
    from /home/navyug/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open-uri.rb:35:in `open'
    from /home/navyug/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open-uri.rb:35:in `open'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:52:in `initialize'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:61:in `new'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:61:in `initialize'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:9:in `new'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:9:in `<module:Debugger>'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:8:in `<top (required)>'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.7/lib/rails/rack/debugger.rb:9:in `initialize'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:295:in `new'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:295:in `block in build_app'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:291:in `reverse_each'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:291:in `build_app'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.7/lib/rails/commands/server.rb:70:in `start'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.7/lib/rails/commands.rb:55:in `block in <top (required)>'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.7/lib/rails/commands.rb:50:in `tap'
    from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.7/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

RubyGems 环境

  • 红宝石版本:1.8.24
  • 红宝石版本:1.9.3(2012-04-20 补丁级别 194)[i686-linux]
  • 安装目录:/home/navyug/.rvm/gems/ruby-1.9.3-p194
  • 红宝石可执行文件:/home/navyug/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
  • 可执行目录:/home/navyug/.rvm/gems/ruby-1.9.3-p194/bin
  • 红宝石平台:
    • 红宝石
    • x86-linux
  • 宝石路径:
    • /home/navyug/.rvm/gems/ruby-1.9.3-p194
    • /home/navyug/.rvm/gems/ruby-1.9.3-p194@global
  • 宝石配置:
    • :update_sources => 真
    • :详细 => 真
    • :基准 => 假
    • :回溯 => 假
    • :bulk_threshold => 1000
  • 远程资源:
4

1 回答 1

0

我认为您的设置中缺少 Readline 包。由于您使用的是 RVM,请尝试通过 rvm 安装 readline 包。这些链接可能会有所帮助:

于 2012-07-27T06:47:48.430 回答