From: Charles Comstock Date: 2004-04-09T15:14:15+09:00 Subject: Re: 'nother question on erb/eruby Dick Davies wrote: > Greg Brondo wrote: > >> Ok, I've got it kinda working (erb) that is...eruby doesn't want to >> compile >> for me (I'm still a bit new to working with Makefiles -- cannot find >> ruby.h). >> >> Anyway, I can run erb like so: erb blah.rhtml >> >> The problem is any ruby 'puts' statements appear first in the actual >> output. > > > You don't generally use 'puts' to generate the content, try > > 0rasputin@lb:sieves$ erb erb.html > > > Hello World > > > 0rasputin@lb:sieves$ cat erb.html > > > <%= "Hello World" %> > > > > > I guess the eruby stuff would be useful - see: > > http://www.rubydoc.org/books/modruby/c277.htm > > > > Hmm, it's pretty general practice in all the other embedded languages that use the <% %> style coding to be able to also print directly in the language, ie sometimes it makes more sense. Is there a particular reason the code generation places the puts before hand? I mean from my reading of the way erb works it shouldn't be doing that? Anyone have an explanation to this behavior? Charles Comstock