Getting Input (Ruby Exercise)


#1

Hello, any help would be appreciated. I have gone through the trouble shooting guide. The code I have entered is shown below. The cog just keeps turning and won't let be progress to the next task. There is no message to tell me I'm right or wrong.

print "What's your first name?"
first_name = gets.chomp


#2

Hi try to refresh the page.


#3

Thank you for your response. Have tried refreshing and even rebooting my Mac several times over the last 2 hours!

Will try again.


#4

try to change browser.


#5

I have now downloaded Firefox, but it has not made any difference. I think I will leave it for today and come back with fresh eyes tomorrow.

Thanks, Clare


#6

This code should have written a message to the terminal. It should have displayed:

What's your first name?

Do you see that in the terminal window?


#7

Hi Judy,

Yes, that message did appear in the terminal. However, in Safari the cog just turned continuously and in Firefox the 'save and submit' tab turned solid blue. I could not move on from the exercise.

Thanks, Clare


#8

That is normal. It is sitting there waiting for you to reply to the message and then press enter.

gets

That command is used to get input from users of your program.


#9

All sorted - such a simple solution!


#11