Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to escape from (END) in terminal for binding.pry

I'm stuck inside of a pry session.

There was a long list of text which I had to scroll through and now I can't seem to escape.

I have tried ctrl + c and ctrl + v and esc and enter. Nothing seems to work.

like image 609
Abram Avatar asked Sep 20 '13 16:09

Abram


People also ask

How do you exit the binding loop in pry?

If you are using Pry in your project, you might run into situation where you are in a loop or having multiple binding. pry and so you have to use exit multiple times to get out from it. So, instead of using exit multiple times, you can use exit-program to continue the execution without breaking into Pry again.

How do you go to the next line in binding pry?

If you're in regular old Pry you can use exit to go to the next binding. pry or disable-pry to exit Pry entirely. There's also pry-byebug to combine these two libraries.

Why is pry not working?

To fix this just move the binding. pry command one line to the top and try to run your file again. If it still doesn't catch it, move the binding. pry command one more line to the top and keep doing this until your file catches the binding.


2 Answers

Try 'q', the binding for less. But it may depends on which default pager you use.

like image 81
kik Avatar answered Oct 24 '22 13:10

kik


For me, it seems pry had bugged out, and after trying @kik's suggestion,

I resorted to:

  • typing exit and hitting enter, then
  • rails c to get back into the console.

Nothing else I could find seemed to work

like image 22
stevec Avatar answered Oct 24 '22 15:10

stevec