问题
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