In Rails ERB, you can suppress newlines by adding a trailing hyphen to tags:
<% for @item in @items -%> <%= @item %>
It is 2016 now, and I think this issue is still present. In this tutorial https://www.youtube.com/watch?v=vQjmz9wCjLA at around 1:45 a unittest of a template shows that there is a trailing newline on the end of the tag.