Exiting the Rails console after an error

You can come out from console screen by simply typing 'exit' on console and pressing 'enter'.

but today i faced some weird issue, when i displayed all records available in table which exceeds console screen size

then i pressed enter button until we reach end of records, now if we press "Control + C", "Control + Z" and exit commands nothing worked for me.

I get stuck on console screen and screen was not allowing me to do anything.

Finally got Solution!!!!

press 'q' key 

BooM!!

Now every thing normal :)


if the above fails, open another terminal then:

ps aux | grep ruby

you'll get something like:

username      917  52.7  0.4  2455912  17484 s000  R+    9:22AM   0:01.13 /Users/yourusername/.rvm/rubies/ruby-1.9.2-p180/bin/ruby script/rails c

you'll need the "917" id:

sudo kill -9 917

(also i think this should be migrated to superuser.com)


You could try:

  • Ctrl D
  • Ctrl Z and then Enter
  • Typing exit, then Enter.