small medium large xlarge

20 Sep 2012, 14:51
Shazad Rehman (4 posts)

Hi, I’ve been learning Ruby for the last four or so months and have hit a problem I can’t solve. I stumbled on the ncurses example shown on page 773 and thought it would be good to play around with. I typed it in and ran it. Sadly, I couldn’t get it to work. Keyboard input is not accepted and the vertical bar does not move. If I hit enter the program quits.

There is something I am missing, I am sure. I just can’t seem to find it:( I’m running it on OSX within iTerm2.

I have googled around but to no avail.

Does anyone have any suggestions?


27 Sep 2012, 22:50
Shazad Rehman (4 posts)

I eventually got to the bottom of what was causing the problem. The crmode is not required. Putting the terminal into cbreak mode fixes the issue as the terminal does not buffer the input until a newline or carriage return is received.

You must be logged in to comment