Probably this has been discussed earlier elsewhere.

I am having some problem while using PDFWriter in rails. following
code throws error:

my_table.render_on(pdf)

In short, I get error:

no marshal_dump is defined for class Mutex

RAILS_ROOT: /home/hemant/foo_app/config/..
Application Trace | Framework Trace | Full Trace

/usr/local/lib/site_ruby/1.8/transaction/simple.rb:370:in `dump'
/usr/local/lib/site_ruby/1.8/transaction/simple.rb:370:in `start_transaction'
/usr/local/lib/site_ruby/1.8/transaction/simple/group.rb:89:in
`start_transaction'
/usr/local/lib/site_ruby/1.8/transaction/simple/group.rb:89:in
`start_transaction'
/usr/local/lib/site_ruby/1.8/pdf/simpletable.rb:397:in `render_on'
#{RAILS_ROOT}/app/controllers/analytics_controller.rb:266:in `pdf_download'
#{RAILS_ROOT}/app/controllers/analytics_controller.rb:224:in `pdf_download'
/usr/bin/mongrel_rails:18

It turns out that, people in past also had problems when using
PDFWriter under rails, because  rails bundles its own version of
Simple Transaction(simple.rb) package.

But the package bundled with rails is not complete and hence the
libraries that need full blown simple transaction package more or less
break.

I have also tried patching activerecord with this patch:

http://dev.rubyonrails.org/attachment/ticket/4732/do-not-require-transaction-simple-if-already-loaded.patch

doesn't seem to work. I am also using LoginEngine *code* (i.e just the
code, not the engine itself ,for admin interface). But I have got rid
of most of the transaction statements from the code for the time
being.

So, I am curious..

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

What are my options?


-- 
There was only one Road; that it was like a great river: its springs
were at every doorstep, and every path was its tributary.