From: Joe Van Dyk Date: 2005-08-04T05:41:47+09:00 Subject: Re: [Rails] RMagick problem On 8/3/05, Pit Capitain wrote: > Joe Van Dyk schrieb: > > I still have no idea why it's giving me "Zero-length blob > > not permitted" for this line: > > @magick_image = Magick::Image.from_blob(@file.read).first > > > > What's weird is that if I leave out the .first method call, I don't > > get that error. But if I print out the size of @file.read.size, and > > then call the Image.from_blob line, then I get the Zero-length blob > > error. > > > > It's driving me crazy. :( > > I hope it's not too late :-) If you call @file.read.size, shouldn't you > then do a #rewind before reading again? Hm, dunno. I'll try it when I get home. I just added the print statement to debug it. It was failing before adding the 'puts @file.read.size' line.