Getting user input

I can’t get past this exercise ‘Getting user input’
This is my code:

print ‘user_input’
user_input = gets.chomp

The wheel just spins endlessly. Please help.

use print “user_input” instead print ‘user_input’

I tried:

print “user_input”
user_input = gets.chomp

The wheel just spins. Thanks for trying to help.

print “user input”
user_input = gets.chomp

you’re welcome :smile:

I’m having the exact same problem.
It seems like there is a bug here. I typed in what was on the answer forum.

It isn’t a bug there, because I’ve Ruby fully completed. A snapshot of the entire lesson would help to refresh what the lesson wants.

print “user input”
user_input = gets.chomp

I’ve put this code in and I still get the spinning wheel, does anyone know what I’m doing wrong?

After you have typed something in, make sure you press the return key on your keyboard.

1 Like

have you tried refreshing the page?

Unfortunately nothing seems to be working. Thank you for all the suggestions. I will try the Java course and come back to Ruby when this ‘problem’ is fixed.

I am having the same issue here

I tried all suggestions from other users.

Is there another way of going around it?


if you use the code from the first activity it works puts "Text to search through: "
text = gets.chomp
puts "Word to redact: "
redact = gets.chomp

words = text.split(" ")

words.each do |word|
if word != redact
print word + " "
print "REDACTED "

I did this.And it worked.Try it!

print “What’s your name?”
user_input = gets.chomp

1 Like

Didn’t work for me :frowning:
This page keeps pausing (“spinning wheel”)
Can anyone help?

Hi, i just made it! This is my code:
print “user input”
user_input = gets.chomp

After that the wheel will be spining, but in the right there is table where you need to write somethink. For example i wrote Hi , and i pressed Enter on your keyboard, and then i made this exercise. Try it by yourself and tell me if this works for you guys :wink:

You’ll first write print since it says to do so in the instructions.Next, since it says to declare a variable called users_input and set it equal (=) to gets.chomp.

You will write:

print user_input =gets.chomp

It should work!

I need help none of those work for me it just says “make sure to use the print key word for the promt user.”

you need to set your value for user_input then print the variable. in ruby you do not put your variables in quotations otherwise they become strings.

fun = ruby
print fun

Worked for me
You have to put a name in the top left box