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

**URL:** <https://www.ruby-forum.com/t/pdf-writer-and-transaction-simple-conflict-between-rails/51633>\
**Category:** Rails\
**Created:** [December 2, 2005, 8:40am UTC](https://www.ruby-forum.com/t/pdf-writer-and-transaction-simple-conflict-between-rails/51633 "2005-12-02T08:40:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![francois.beausoleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/b487fb/32.png) [@francois.beausoleil](https://www.ruby-forum.com/u/francois.beausoleil)\
**Post date:** [December 2, 2005, 8:40am UTC](https://www.ruby-forum.com/t/pdf-writer-and-transaction-simple-conflict-between-rails/51633/1 "2005-12-02T08:40:00Z")

</div>

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 !

---

<div class="post-metadata">

**Author:** ![francois.beausoleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/b487fb/32.png) [@francois.beausoleil](https://www.ruby-forum.com/u/francois.beausoleil)\
**Post date:** [December 2, 2005, 10:45am UTC](https://www.ruby-forum.com/t/pdf-writer-and-transaction-simple-conflict-between-rails/51633/2 "2005-12-02T10:45:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![francois.beausoleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/b487fb/32.png) [@francois.beausoleil](https://www.ruby-forum.com/u/francois.beausoleil)\
**Post date:** [December 2, 2005, 3:02pm UTC](https://www.ruby-forum.com/t/pdf-writer-and-transaction-simple-conflict-between-rails/51633/3 "2005-12-02T15:02:34Z")

</div>

On 12/2/05, David M. [removed\_email\_address@domain.invalid](mailto: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

---

<div class="post-metadata">

**Author:** ![francois.beausoleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/b487fb/32.png) [@francois.beausoleil](https://www.ruby-forum.com/u/francois.beausoleil)\
**Post date:** [December 5, 2005, 9:14pm UTC](https://www.ruby-forum.com/t/pdf-writer-and-transaction-simple-conflict-between-rails/51633/4 "2005-12-05T21:14:28Z")

</div>

Hi !

2005/12/2, Austin Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> On 12/2/05, David M. [removed\_email\_address@domain.invalid](mailto: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 !
