ruby on rails for do loop code example Example: rails loop while $i < $num do puts("Inside the loop i = #$i" ) $i +=1 end