Ruby 意外撬动导航工作

Ruby 意外撬动导航工作,ruby,pry,Ruby,Pry,我把binding.pry放在脚本中 但现在当它在断点处停止时 这是给我的信息 这超出了我的预期,如何解决 帧编号:0/11 From: /Users/me/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/pry-nav-0.2.4/lib/pry-nav/tracer.rb @ line 21 PryNav::Tracer#run: 12: def run(&block) 13: # For performance,

我把
binding.pry
放在脚本中

但现在当它在断点处停止时

这是给我的信息

这超出了我的预期,如何解决

帧编号:0/11

From: /Users/me/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/pry-nav-0.2.4/lib/pry-nav/tracer.rb @ line 21 PryNav::Tracer#run:

    12: def run(&block)
    13:   # For performance, disable any tracers while in the console.
    14:   # Unfortunately doesn't work in 1.9.2 because of
    15:   # http://redmine.ruby-lang.org/issues/3921. Works fine in 1.8.7 and 1.9.3.
    16:   stop unless RUBY_VERSION == '1.9.2'
    17:
    18:   return_value = nil
    19:   command = catch(:breakout_nav) do      # Coordinates with PryNav::Commands
    20:     return_value = yield
 => 21:     {}    # Nothing thrown == no navigational command
    22:   end

我最近也有同样的问题。在终端中键入以下内容,检查pry gems:

gem list pry

这将返回您所有的撬相关宝石。我通过卸载所有额外的pry Gem(例如pry nav)修复了这个问题。对我来说,引起问题的是pry bye bug gem。

gem卸载pry nav
为我修复了它。

在我的情况下,它不是byebug只是pry nav事实上,我刚刚更新为pry byebug 3.2.0(使用byebug 5.0.0),现在一切都很好。摆脱just pry byebug也对我有效,谢谢!pry nav和pry byebug有时会发生冲突:保证您只使用其中一个。。。我建议你用比伯撬。(pry byebug的文档中明确提到,您不应该随身携带一些宝石,即其中一个是pry nav)