Getting user input


#1

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.


#2

use print "user_input" instead print 'user_input'


#3

I tried:

print "user_input"
user_input = gets.chomp

The wheel just spins. Thanks for trying to help.


#4

print "user input"
user_input = gets.chomp

you're welcome :smile:


#5

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


#6

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.


#7

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?


#8

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


#9

have you tried refreshing the page?


#10

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.


#11

Hi
I am having the same issue here

I tried all suggestions from other users.

Is there another way of going around it?

Thnaks


#12

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 + " "
else
print "REDACTED "
end
end


#13

I did this.And it worked.Try it!

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


#14

Didn't work for me :frowning:
This page keeps pausing ("spinning wheel")
Can anyone help?


#15

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:


#16

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!


#17

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


#18

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


#21

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


#23