I'm tried these ruby code lines to run in sublimeText3 but I dont get any error even in view ->show console. Show result shows me that the coding is building, but I couldn't see any output there. The below code is what I'm trying.
guess.rb
words = ['foobar', 'baz', 'quux']
secret = words[rand(3)]
print "guess? "
while guess = STDIN.gets
guess.chop!
if guess == secret
puts "You win!"
break
else
puts "Sorry, you lose."
end
print "guess? "
end
puts "The word was ", secret, "."