[fxruby-users] FXRuby & erb -- problems together?

djlewis djlewis at triadic.com
Sat Feb 21 08:24:00 EST 2009

I'm having vexing problems with some erb templates I use to generate html. 
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 started
giving random mysterious, intermittent errors during actual generation, the
outf.write statement...

      template = ERB.new( IO.read( proto_company_index))
      out_file = out_folder + @company + " indx.html"
      outf = File.new( 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, it's
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 the
same code with FXruby going.  So you see how random it is. (And these errors
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. 
View this message in context: http://www.nabble.com/FXRuby---erb----problems-together--tp22135995p22135995.html
Sent from the FXRuby Users mailing list archive at Nabble.com.

More information about the fxruby-users mailing list