/usr/local/lib/ruby/gems/1.8/gems/transaction-simple-1.4.0/lib/
transaction/simple.rb:129:in `dump': singleton can't be dumped
(TypeError)
from /usr/local/lib/ruby/gems/1.8/gems/transaction-
simple-1.4.0/lib/transaction/simple.rb:129:in `start_transaction'
from /usr/local/lib/ruby/gems/1.8/gems/transaction-
simple-1.4.0/lib/transaction/simple/group.rb:102:in
`start_transaction'
from /usr/local/lib/ruby/gems/1.8/gems/transaction-
simple-1.4.0/lib/transaction/simple/group.rb:102:in `each'
from /usr/local/lib/ruby/gems/1.8/gems/transaction-
simple-1.4.0/lib/transaction/simple/group.rb:102:in
`start_transaction'
from /usr/local/lib/ruby/gems/1.8/gems/pdf-writer-1.1.3/lib/
pdf/simpletable.rb:397:in `render_on'
from /usr/local/lib/ruby/gems/1.8/gems/ruport-1.0.0/lib/ruport/
formatter/pdf.rb:324:in `draw_table'
from /usr/local/lib/ruby/gems/1.8/gems/pdf-writer-1.1.3/lib/
pdf/simpletable.rb:110:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/ruport-1.0.0/lib/ruport/
formatter/pdf.rb:315:in `new'
... 12 levels...
from /usr/local/lib/ruby/gems/1.8/gems/ruport-1.0.0/lib/ruport/
data/table.rb:719:in `method_missing'
from table.rb:21
from table.rb:20:in `open'
from table.rb:20
can you send the inspect output of the table?
thanks,
greg
A little while back when I ran into something similar it turned out that
I was putting arbitrary objects in the table, expecting to_s to be
called on them. Worked fine in text and HTML, barfed similarly in PDF.
Just a thought.
- donald
This is the issue I'm suspecting that could be what Bob is running
into. I wonder, should we add the explicit to_s action? If Text and
HTML behave that way, pehaps a bug for them not to be uniform. What
are your thoughts on this Donald?
I think that would be a good change. It's what I expected would happen,
and apparently this developer did as well.
- donald
I'm willing to patch 1.0, but I need a reproducable bug report
(preferably a unit test) that shows the issue. I can investigate
that myself soon, but since you've both ran into that, it'd speed
things up a whole lot if you can show me some code that breaks.
My #inspect output is very large, but here's the first Record:
#<Ruport::Data::Table:0x218336c
@column_names=[:formatted_i_d, :name, :priority, :severity, :found_in_build],
@data=
[#<Ruport::Data::Record:0x218304c
@attributes=[:formatted_i_d, :name, :priority, :severity, :found_in_build],
@data=
{:task_remaining_total=>"0.0",
:priority=>"Low",
:blocked=>"false",
:name=>"Salesforce integration broken in User Story Mode",
:formatted_i_d=>"DE46",
:salesforce_case_number=>"00004239",
:notes=>nil,
:tasks=>nil,
:severity=>"Major Problem",
:environment=>"Production",
:schedule_state=>"Defined",
:owner=>"mri...@rallydev.com",
:customer=>"Arc Solutions",
:opened_date=>"2007-04-25T16:48:25.000Z",
:object_i_d=>"42222945",
:submitted_by=>"ashley",
:state=>"Open",
:revision_history=>
#<RestObject:0x2153068
@document=<UNDEFINED> ... </>,
@document_content=
"<RevisionHistory rallyAPIMajor='1' type='RevisionHistory'
rallyAPIMinor='0' ref='https://rally1.rallydev.com:443/slm/webservice/
1.0/revisionhistory/42222946'/>",
@elements=nil,
@password="xxx",
@rally_rest=
#<RallyRestAPI:0x5b1490
@base_url="https://rally1.rallydev.com/slm",
@builder=
#<RestBuilder:0x5b1440
@base_url="https://rally1.rallydev.com/slm",
@password="xxx",
@username="bob">,
@logger=nil,
@parse_collections_as_hash=false,
@password="xxx",
@raise_on_warning=nil,
@username="bob">,
@username="bob">,
:description=>"Affects both APM and Salesforce",
:workspace=>
#<RestObject:0x2156830
@document=<UNDEFINED> ... </>,
@document_content=
"<Workspace rallyAPIMajor='1' type='Workspace'
rallyAPIMinor='0' refObjectName='Rally' ref='https://
rally1.rallydev.com:443/slm/webservice/1.0/workspace/41529001'/>",
@elements=nil,
@password="xxx",
@rally_rest=
#<RallyRestAPI:0x5b1490
@base_url="https://rally1.rallydev.com/slm",
@builder=
#<RestBuilder:0x5b1440
@base_url="https://rally1.rallydev.com/slm",
@password="xxx",
@username="bob">,
@logger=nil,
@parse_collections_as_hash=false,
@password="xxx",
@raise_on_warning=nil,
@username="bob">,
@username="bob">,
:exception_email=>"false",
:release_note=>"false",
:task_actual_total=>"0.0",
:affects_doc=>"false",
:resolution=>"None",
:creation_date=>"2006-12-04T20:21:17.000Z",
:task_estimate_total=>"0.0",
:attachments=>nil,
:salesforce_case_i_d=>"50030000002tUtA",
:duplicates=>nil,
:subscription=>
#<RestObject:0x2158130
@document=<UNDEFINED> ... </>,
@document_content=
"<Subscription rallyAPIMajor='1' type='Subscription'
rallyAPIMinor='0' refObjectName='Rally Development' ref='https://
rally1.rallydev.com:443/slm/webservice/1.0/subscription/400059'/>",
@elements=nil,
@password="xxx",
@rally_rest=
#<RallyRestAPI:0x5b1490
@base_url="https://rally1.rallydev.com/slm",
@builder=
#<RestBuilder:0x5b1440
@base_url="https://rally1.rallydev.com/slm",
@password="xxx",
@username="bob">,
@logger=nil,
@parse_collections_as_hash=false,
@password="xxx",
@raise_on_warning=nil,
@username="bob">,
@username="bob">}>,
#<Ruport::Data::Record:0x2182e08
@attributes=[:formatted_i_d, :name, :priority, :severity,
:found_in_build],
[and so on]
On May 18, 2:09 pm, "Ball, Donald A Jr \(Library\)"
Hmm... It seems like that :revision_history data may be to blame.
I will look at the to_hash implementation and see if anything strange
might be happening with it, but let me know what happens when you drop
the :revision_history data.
All good now.
-Bob
On May 21, 4:43 pm, "Gregory Brown" <gregory.t.br...@gmail.com> wrote:
Oh, right. PDF::Writer depends on being able to roll back
transactions, so the objects need to be serializable.
Good to know we can safely close this issue for now.