Forum: Ruby on Rails PDF::Writer and Transaction::Simple - conflict between Rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
francois.beausoleil (Guest)
on 2005-12-02 09:40
(Received via mailing list)
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 !
monch1962 (Guest)
on 2005-12-02 11:45
(Received via mailing list)
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.
halostatue (Guest)
on 2005-12-02 16:02
(Received via mailing list)
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
francois.beausoleil (Guest)
on 2005-12-05 22:14
(Received via mailing list)
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 !
This topic is locked and can not be replied to.