新手问题 急求助,require ‘debugger’ 出錯

btgege · 2013年03月01日 · 最后由 btgege 回复于 2013年03月01日 · 2784 次阅读

windows xp 下安裝了 ruby ruby 1.9.3p392 (2013-02-22) [i386-mingw32] 安裝了 debugger gem install debugger

在 irb 下 require‘debugger’不成功,顯示 NameError: uninitialized constant Debugger::LocalInterface::Readline from C:/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.3.3/lib/ruby-debug/i nterface.rb:55:in block (2 levels) in initialize' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.3.3/lib/ruby-debug/i nterface.rb:53:ineach' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.3.3/lib/ruby-debug/i nterface.rb:53:in block in initialize' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.3.3/lib/ruby-debug/i nterface.rb:52:inopen' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.3.3/lib/ruby-debug/i nterface.rb:52:in initialize' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.3.3/lib/ruby-debug/p rocessor.rb:61:innew' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.3.3/lib/ruby-debug/p rocessor.rb:61:in initialize' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.3.3/lib/ruby-debug.r b:9:innew' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.3.3/lib/ruby-debug.r b:9:in <module:Debugger>' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.3.3/lib/ruby-debug.r b:8:in' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir e.rb:110:in require' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir e.rb:110:inrescue in require' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir e.rb:35:in require' from (irb):1 from C:/Ruby193/bin/irb:12:in

' irb(main):002:0> require 'ruby-debug19' LoadError: cannot load such file -- ruby-debug19 from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir e.rb:45:in require' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir e.rb:45:inrequire' from (irb):2 from C:/Ruby193/bin/irb:12:in `'

是什麼原因呀,求幫助

匿名 #1 2013年03月01日

貌似是没有 Readline

新手,請教怎樣弄。 *** LOCAL GEMS ***

archive-tar-minitar (0.5.2) bigdecimal (1.1.0) columnize (0.3.6) debugger (1.3.3) debugger-linecache (1.1.2) debugger-ruby_core_source (1.2.0) io-console (0.3) json (1.5.5) minitest (2.5.1) mysql (2.9.1 x86-mingw32) rake (0.9.2.2) rbx-require-relative (0.0.9) rdoc (3.9.5) ruby_core_source (0.1.5) rubygems-update (2.0.0)

NameError: uninitialized constant Debugger::LocalInterface::Readline 你搜索下这一行。

最好换 linux。

require 'readline' require‘debugger’ 试试

到很多地方搜索了的,還是沒有頭緒,環境要求是 windows,沒有辦法。 require 'readline' LoadError: cannot load such file -- readline

from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir e.rb:45:in require' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_requir e.rb:45:inrequire' from (irb):2 from C:/Ruby193/bin/irb:12:in `

'

需要 登录 后方可回复, 如果你还没有账号请 注册新账号