From: Rein Henrichs Date: 2010-06-11T01:40:07+09:00 Subject: Re: How to print something with erb? On 2010-06-10 07:59:42 -0700, Dominic Rose said: > Hello, > I'm having a problem to output things in the write order with erb1.9 > and lighttpd . I don't know if it's the normal comportement of erb but > this is how it works for me: > > Content of my ERB file: test{<%= 1 %>2<% puts 3 %>} > > On my web browser I get this output: > 3 > test{12} > > puts or print comes before any text.. Do you wich function instead of > puts would print test{123}? > > Thanks wery much Do not combine puts with <%= %> output in your erb templates. puts prints to STDOUT, which may or may not be where your erb template is rendered. Just use <%= %>. -- Rein Henrichs http://puppetlabs.com http://reinh.com