FAQ: Control Flow in Ruby - How It Works

This is a recurring issue through many of the topics on CA. Perhaps they need to include special instructions for the console?

One expects these old course modules will be retired in the not too distant future. The problems seem to have cropped up when CC changed the learning environment to a Node.js based platform. It affected Ruby, Python and JS in roughly the same way… Not handling user inputs.

In Node.js, JS’s, prompt() is not directly supported and requires a special module, prompt-sync which the engineers may have left out on purpose, or by simply overlooking the need for this added support.

We should not expect this to get fixed any time soon, if at all.

These are my comments, and not the advice from CC.

1 Like

I had the same issue. Clicking the run button just produced an error and I was unable to put an integer in the terminal.

I found a solution though! If you click ‘View Solution’ and then click ‘Replace With Solution’, and then click ‘run’ the program seems to run fine and accept an integer. (you do have to click on the little white box after the question to be able to enter an integer)