From: patrick-may@... (Patrick May) Date: 2002-02-20T12:18:14+09:00 Subject: Might be IO.pipe, not eruby (was Re: eRuby and require) > I've got eruby going however, whenever I try to require, the script times out. > > cygwin is under E:\cygwin > ruby is under E:\ruby > eruby binary is in cgi-bin I've gotten timeouts using eruby with scripts that had a section like this: ----------------------- require 'eruby' compiler = ERuby::Compiler.new code = compiler.compile_file( rhtml_file ) r, w = IO.pipe $defout = w eval( code ) $defout = $stdout w.close output = r.read r.close cgi.out{ output } ----------------------- Is this the type of script you have? This can hang, but eruby is not the culprit. Above a certain size IO.pipe doesn't seem to work right. here's a script to demonstrate IO.pipe hanging: ----------------------- aString = "" # 610.times works 611.times { |i| aString += "print \"#{i}\"\n" } puts aString.length r , w = IO.pipe $defout = w eval( aString ) $defout = $stdout w.close output = r.read r.close print output ----------------------- If you use a Tempfile, instead of IO.pipe, the above script works. My machine is isn't stressed for memory when I run this script, either. Is this a bug? Is this a limit of the language? Are there any work arounds? ~ Patrick May