PDF::Writer and Transaction::Simple - conflict between Rails


#1

Hi !

I’m having a BIG problem here. I am outputting PDFs from some of my
controllers. Things work fine. I put in vendor/ Transaction::Simple
1.3.0

Now, after I added Transaction::Simple to vendor/, some of my tests
are failing - they are all tests which use transactions explicitely.

Something like this:
def move_before(line)
raise ArgumentError, ‘expected another QuoteLine - received Nil’
unless line
self.class.transaction(self, line) do
self.insert_at(line.position)
end
end

This now fails because the transaction seems to rollback everytime.
So, I removed Transaction::Simple, but now PDF::Writer fails to render
tables by raising this:

  1. Error:
    test_view_as_pdf(Admin::QuotesControllerTest):
    MissingSourceFile: No such file to load – group

PDF::Writer is trying to load Transaction::Simple::Group at this point.

Anybody has a solution for this quandary ?

Thanks for any help !


#2

Possibly obvious - have you tried removing and reinstalling PDF::Writer?

At a guess, installing Transaction::Simple overwrote a file that
PDF::Writer was using, and when you removed Transaction::Simple it
removed the overwritten file. If reinstalling PDF::Writer doesn’t
work, I’d just work through everything you’ve got installed
progressively and reinstall each one until the problem goes away.

Good luck

Dave M.


#3

On 12/2/05, David M. removed_email_address@domain.invalid wrote:

Possibly obvious - have you tried removing and reinstalling PDF::Writer?

That won’t solve this. PDF::Writer 1.1.x requires
Transaction::Simple 1.3.0; it requires the group functionality. If
Rails is being shipped with a version of Transaction::Simple prior
to 1.3.0, then it should be updated – quickly.

-austin

Austin Z. * removed_email_address@domain.invalid
* Alternate: removed_email_address@domain.invalid


#4

Hi !

2005/12/2, Austin Z. removed_email_address@domain.invalid:

On 12/2/05, David M. removed_email_address@domain.invalid wrote:

Possibly obvious - have you tried removing and reinstalling PDF::Writer?

That won’t solve this. PDF::Writer 1.1.x requires
Transaction::Simple 1.3.0; it requires the group functionality. If
Rails is being shipped with a version of Transaction::Simple prior
to 1.3.0, then it should be updated – quickly.

I’d like to chime in that I removed the bundled Transaction::Simple
from Rails, and used an unpacked Transaction::Simple 1.3.0 in vendor
to good effect.

Thanks for the help !