From: hemant Date: 2006-12-12T02:48:51+09:00 Subject: Re: problem with ActiveRecord and PDFWriter On 12/11/06, J�r�me Loyet wrote: > > Austin Ziegler a �crit : > > > On 12/4/06, hemant wrote: > > > no marshal_dump is defined for class Mutex > > > > You look like you're doing something threaded. I don't know if that's > > Rails doing it for you, but you can't dump either threads or mutexes > > in Ruby. You *must* have the latest Transaction::Simple (and Rails > > *really* needs to remove it and add the latest version as a > > dependency; I'm getting ready to release a new version that's even > > more useful and PDF::Writer *will* depend on it moving forward). > > > > > 1. If the problem is in my code? > > > 2. If there is a problem with PDFWriter or AR > > > 3. Or the said patch simply doesn't work > > > > I suspect 1, 2 (with respect to ActiveRecord bundling > > Transaction::Simple; something I've asked them to fix a long time > > ago), and 3. > > > > -austin > > Hello, > > I have exactly the same problem. But the problem doesn't appear if I > test in local with webrick (in development or production environment) > but it appears with apache+mongrel. > > All the libraries are in the same version on both configuration (1.1.6 > for rails, 1.3.0 for transaction-simple and 1.1.3 for pdf-writer). > > I really don't know what to do. > Any help ? I have tried in vain to patch AR, but it doesn't seem to ( sorry for violating DRY) Hmm...there are couple of things which are threaded in my app, but they don't run within rails. For example: 1. Mongrel itself is threaded. 2. Backgroundrb I am using, which is threaded. 3. I am using a third party charting thingy, which is threaded. But when I went through code of PDFWriter, it seemed that indeed they create a mutex and start the transaction. Now, there ain't any mutexes anywhere in my code and the library I am using is well tucked away. So only guy creating a mutex was PDFWriter and i suspect PDFWriter is only trying to dump it. I am really out of ideas, here... if anyone can help? -- There was only one Road; that it was like a great river: its springs were at every doorstep, and every path was its tributary.