rails服务器处于调试模式

时间:2012-07-27 05:22:31

标签: ruby-on-rails-3

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

/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环境

  • RUBYGEMS版本:1.8.24
  • RUBY VERSION:1.9.3(2012-04-20 patchlevel 194)[i686-linux]
  • 安装目录:/home/navyug/.rvm/gems/ruby-1.9.3-p194
  • RUBY EXECUTABLE:/home/navyug/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
  • 可执行目录:/home/navyug/.rvm/gems/ruby-1.9.3-p194/bin
  • RUBYGEMS PLATFORMS:
    • 红宝石
    • x86的Linux的
  • GEM路径:
    • /home/navyug/.rvm/gems/ruby-1.9.3-p194
    • /home/navyug/.rvm/gems/ruby-1.9.3-p194@global
  • GEM配置:
    • :update_sources =&gt;真
    • :verbose =&gt;真
    • :benchmark =&gt;假
    • :backtrace =&gt;假
    • :bulk_threshold =&gt; 1000
  • 远程来源:

1 个答案:

答案 0 :(得分:0)

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