From: Nicholas Van Weerdenburg Date: 2005-01-13T01:42:56+09:00 Subject: Re: Webrick, erb, and .rhtml You misread the page. It says exactly what you got. Notice it is showing eruby and erb examples. The erb example gives what you got. <% print "hello" %> goes to stdout. <%= "hello" %> is a short-cut for something like <% response.print "hello" %> which may or may not be/include stdout. So depending on how stdout is handled during building the template, <% print "hello" %> may or may not work. In the examples on the erb page, it shows it working for eruby but not for erb. Nick On Thu, 13 Jan 2005 01:25:17 +0900, Belorion wrote: > > You need <%= %> rather than <% %>. But keep in mind that what erb > > will show you is the result of evaluating the expression. The result > > of evaluating 10.times {...} is 10 -- and the result of evaluating > > puts is nil. So if you want to display all the numbers, you'd want > > something like: > > > > <%= (1..10).to_a.join(", ") %> > > > > David > > Further research shows me that on the Erb website > (http://www2a.biglobe.ne.jp/~seki/ruby/erb.html) that > > Hello <% print "world" %> > > Should give me: > > Hello world > > But this is not the case. Rather, I get worldHello. ??? Does anyone > else have this behaviour with Erb? > > -- Nicholas Van Weerdenburg