[Mongrel] Failure on File::Read in Mongrel called by Flash

Edmund Jorgensen ewj at ideaport.com
Thu Nov 9 19:04:38 EST 2006

Hash: SHA1

Hello all,

I'm using Mongrel in a project and experiencing a strange failure
under the following circumstances:

I'm running on Debian sarge, using the ruby 1.8.5-3 packages from
testing, and Mongrel  The application serves a number of
flash files that are not in a directory available through the
web--they are served by a ruby routine that reads them in with
File::read and sets the content type / length / disposition headers.

All this works just fine in the simplest case, when the dynamic url to
get the flash file is embedded into an html page.  But in the new
version of our project we're "wrapping" the flash file in another
flash file (it's the only way you can turn on / off menu items in
flashpaper).  The same url that loaded the flash file successfully is
passed to the flash wrapper (with proper encoding / decoding), which
then tries to load that flash file...and fails the instant the ruby
code tries to read the flash file from disk.

When it dies it doesn't raise anything...it just stops.  I'm logging
debug statements and they go something like:

About to get file x (where x is the correct path for the file that
really exists and is readable)...

Then nothing!  Wrapping it in a begin / rescue block has no effect

I know the flash wrapper isn't the problem, or the flash file it's
trying to load...if I make the url to the same file but from a
publicly available web dir, it works just fine.  The whole thing
works just fine on an Ubuntu server running 1.8.4 ruby (same mongrel
version).  This makes me think it's not a problem in mongrel but in
ruby 1.8.5, or how 1.8.5 and Mongrel get along.

This is a non-rails app, by the way.

So, I know this is an arcane problem, but has anybody experienced
anything similar with Mongrel and ruby 1.8.5 and found any solutions /

Many thanks,

Version: GnuPG v1.4.2.2 (GNU/Linux)


More information about the Mongrel-users mailing list