puts statement in ruby automatically adds a new line, how can I avoid it.
puts
Use print instead. You can trace it to STDOUT.flush .
print
STDOUT.flush
In addition, you need to add "\ r" at the end of the line to indicate "carriage return", and do the next print at the beginning of the current line
$stdout.sync = true 100.times do print "." sleep 1 end
"How can I use" puts "on the console without breaking a line in ruby on rails?"