Forum: Ruby FXRuby & erb -- problems together?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
David L. (Guest)
on 2009-02-21 04:21
(Received via mailing list)
I'm having vexing problems with some erb templates I use to generate
The templates used to work just great in a gui-less program. But when I
embedded the template generation code inside a FXRuby interface, it
giving random mysterious, intermittent errors during actual generation,
outf.write statement...

      template = proto_company_index))
      out_file = out_folder + @company + " indx.html"
      outf = out_file, "w")
      outf.write( template.result(binding))

I disabled the FXRuby interface entirely and drove it programmatically
through exactly the same code, and it goes back to working fine.  So,
only circumstantial evidence, but it looks like erb and FXRuby are not
getting along, generating random errors in erb.

Anybody else run into this?

Here are three (different) errors from three different runs of exactly
same code with FXruby going.  So you see how random it is. (And these
do not arise when FXRuby is out of the picture.)

> Uncaught exception: compile error
> (erb):19: syntax error, unexpected tSTRING_BEG, expecting $end

> Uncaught exception: compile error
> (erb):18: syntax error, unexpected tIDENTIFIER, expecting $end

> Uncaught exception: compile error
> (erb):18: Invalid char `\250' in expression
> (erb):19: syntax error, unexpected tCONSTANT, expecting $end

I'd show you the erb template, but trust me, there's nothing near those
lines that could cause this.

PS:  Other than perhaps not working together, FXRuby and erb are each
on their own!
David L. (Guest)
on 2009-02-21 20:47
(Received via mailing list)
I switched to Erubis (in place of erb -- need to change only the class
and it works just fine.) So it looks like erb and FXRuby are indeed

This topic is locked and can not be replied to.