Ruby method chomp removes that newline character from the end of the text in the $_ variable.
print "Please enter the temperature: " gets chomp puts "The temperature is #{$_}."