pry-nav work unexpectedly

谁说胖子不能爱 提交于 2019-12-12 09:30:13

问题


I put binding.pry in my script,

But now when it's stopped at the breakpoint,

is shows me that information.

Which is out of my expectation, how to fix it ?

Frame number: 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

回答1:


I had the same issue recently. Check your pry gems by typing the following into the terminal:

gem list pry

This should return all of your pry related gems. I fixed the issue by uninstalling all of the extra pry gems (e.g., pry-nav). The one that was causing the issue for me was the pry bye-bug gem.




回答2:


gem uninstall pry-nav fixed it for me.



来源:https://stackoverflow.com/questions/26860140/pry-nav-work-unexpectedly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!