From: kwatch Date: 2006-03-08T06:53:43+09:00 Subject: Re: How to print stuff in RTHML embedded code (equiv to php "echo")?? ERB doesn't allow you to use 'print' or 'puts' in eRuby script. You can use print statement if you use Erubis instead of ERB. Erubis is an implementation of eRuby which has some advantages over ERB. http://rubyforge.org/projects/erubis/ For example, the following code is available with Eruby::PrintEruby or Eruby::StdoutEruby class.

<% print "hello\n" print "world\n" print "something something\n" %>

See doc/users-guide.html in the archive. > Hi I got a very noob question which i cant understand why i cant do > things like this...... > > eg... inside. > helloworld.rhtml > >

> <% > puts "hello" > puts "world" > puts "something something" > %> >

> > I know i can do this easily in php > echo "yes this works" > echo "testing 123" > echo "yes this works" > ?> > > Can someone help me? -- regards, kwatch