At 03:14 AM 3/23/2004, Einar Buffer wrote: >I'm trying to use some erb templates to generate some code with ruby. It's >not going too well - in my template, I have something like: > >....code template in plain text... ><% code_lines.each { |line| print line } %> >....more plain text code... Try this: <% code_lines.each do |line| %> <%= line %> <% end %> >What am I doing wrong? Is there a simple tutorial for ERB in english >somewhere? I'm using ruby 1.8.1 with erb 2.0.4. I read the source code to Why's Poignant Guide to figure out how to use ERB. http://rubyforge.org/cgi-bin/viewcvs/cgi/viewcvs.cgi/?cvsroot=poignant ______________________________________ Bret Pettichord, Software Tester Consultant - www.pettichord.com Author - www.testinglessons.com Blogger - www.io.com/~wazmo/blog Homebrew Automation Seminars March 19, Redmond, Washington April 30, Austin, Texas www.pettichord.com/training.html