This is basically a very noob question about Ruby console (IRB), but I couldn’t find answer anywhere. So. When writing a statement in Ruby console and then in the middle of it pressing Enter, sometimes console expects me to continue the statement and start to look like this:
ruby-1.9.2-p180 :093″>
That ” basically tells (i think) that Ruby expects me to finish the statement on the previous line. However there is no way I can finish it or cancel the statement. Pressing Enter again doesn’t really help, and also Ruby stops computing other statements if I enter some at this point.
So, what is this mode and how to handle it?
It means your quotes are unbalanced; enter a quote.
You can also hit
Ctrl-C<Return>, which will drop you to the root prompt.Ctrl-Dwill drop you back to the prompt, but the next<Return>will throw an error due to the unterminated quote.Alternatively, use pry, which will let you use
!to escape back to your top level.