-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't escape from eval with next #20
Comments
What versions of pry and pry-nav are locked in your Gemfile.lock? Also, if you're using ruby 1.9.2, 1.9.3, or 2.0, you should switch to pry-debugger https://github.com/nixme/pry-debugger |
Oh, thanks for asking: pry (0.9.12.1) thx, sam On Jun 5, 2013, at 7:39 PM, Gopal Patel [email protected] wrote:
|
How are you running pry? via |
This may be a repost from earlier. binding.pryinside my create method in my Rails app. Since I'm running 1.9.3 I ditched the pry-navin favor of pry-debugger. I bundle install and update. I was surprised to find the same error. Here is my updated Gemfile.lock:
|
I'm having this same issue when i run RSpec with a binding.pry in the code:
|
Unfortunately, somehow the ruby "next" keyword is getting invoked instead of the pry command. Can you try adding an alias for next: |
|
Seeing the same issue:
Pry.commands.alias_command 'n', 'next' |
Had this same issue for the past month and still haven't figured it out. |
Ditto here. |
ya me too |
Ditto. |
+1 |
Might have figured it out: In my case I was using "require 'pry'". But since I was running ruby 2.0+ I needed to use require 'pry-byebug'. In other words: you might be using the wrong version of pry to ruby. Ruby 1.9.2/1.9.3 => https://github.com/nixme/pry-debugger |
There are several reasons for this: - `next` command inside `irb` never really worked, because the `next` keyword in Ruby would get executed instead (see nixme/pry-nav#20) - Commands were very limited, they couldn't handle any arguments like the regular `next`, `step` and `cont` commands. - It causes issues with the Rails console (see [deivid-rodriguez/pry-byebug#30).
In my case, pry did not have the next command and was using the ruby method. check that next command is present in Pry.commands |
I have switched to pry-debugger and it was also throwing this error. I checked Pry.commands during execution and like @Kshitij-Banerjee pointed out, I didn't have the 'next' or 'step' commands. I added |
@GosuSheep nice. |
Hit the same issue with ruby 2.2.1. Replacing |
Yes, same here. |
+1 |
I believe I've followed the steps to plug in pry-nav into my Gemfile in Rails. As a plug-in to pry, I'm unaware of anything else to do but 'next' yields this syntax error. 'step' yields undefined local variable for 'step.' I've found nothing else on Google of what I'm missing.
The text was updated successfully, but these errors were encountered: