Drop the do. It isn't required, but you have to keep end:
for i in 1..5 print i, " " end # => 1 2 3 4 5