# Ruport problems

**URL:** <https://www.ruby-forum.com/t/ruport-problems/174418>\
**Category:** Ruby\
**Created:** [August 26, 2009, 5:16pm UTC](https://www.ruby-forum.com/t/ruport-problems/174418 "2009-08-26T17:16:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [August 26, 2009, 5:16pm UTC](https://www.ruby-forum.com/t/ruport-problems/174418/1 "2009-08-26T17:16:55Z")

</div>

I have tried the following code with Ruport 1.6.1:  
require “rubygems”  
require “ruport”

## table=Ruport::Data::Table.load( “foo.csv”,:has\_names=\>true) grouping = Ruport::Data::Grouping(table, :by =\> “name”) grouping.save\_as(“foo.pdf”)

I get the following errors:

/usr/lib64/ruby/gems/1.8/gems/ruport-1.6.1/lib/ruport/data/table.rb:695:in  
`column': ArgumentError (ArgumentError) from /usr/lib64/ruby/gems/1.8/gems/ruport-1.6.1/lib/ruport/data/grouping.rb:110:in `grouped\_data’  
from  
/usr/lib64/ruby/gems/1.8/gems/ruport-1.6.1/lib/ruport/data/grouping.rb:173:in  
`send' from /usr/lib64/ruby/gems/1.8/gems/ruport-1.6.1/lib/ruport/data/grouping.rb:173:in `initialize’  
from  
/usr/lib64/ruby/gems/1.8/gems/ruport-1.6.1/lib/ruport/data/grouping.rb:386:in  
`new' from /usr/lib64/ruby/gems/1.8/gems/ruport-1.6.1/lib/ruport/data/grouping.rb:386:in `Grouping’

* * *

The csv file is just a copy paste of the example file of the same name  
used  
on [Rubyreports.org](http://Rubyreports.org). It seems to print to the terminal normally but when  
I  
try to group the data I end up getting the above error. Any ideas on  
what  
the problem could be?

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [August 26, 2009, 8:36pm UTC](https://www.ruby-forum.com/t/ruport-problems/174418/2 "2009-08-26T20:36:43Z")

</div>

On Wed, Aug 26, 2009 at 01:16:28PM +0900, removed\_email\_address@domain.invalid wrote:

> `initialize’  
> The csv file is just a copy paste of the example file of the same name used  
> on [Rubyreports.org](http://Rubyreports.org). It seems to print to the terminal normally but when I  
> try to group the data I end up getting the above error. Any ideas on what  
> the problem could be?

Did you make sure that the CSV file has a header? I am able to  
reproduce your error if I remove the header from the CSV file. Make  
sure your test CSV file looks like this:

me,login time,machine  
Gregory,10:00,bittle  
Joe,11:45,soda  
Jim,9:00,kitten  
Joe,12:15,soda  
Gregory,5:00,kitten  
Joe,12:45,bittle

Hope that helps!

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [August 27, 2009, 3:58am UTC](https://www.ruby-forum.com/t/ruport-problems/174418/3 "2009-08-27T03:58:44Z")

</div>

I got it to work now. had some extra spaces in it. Thanks.

On Wed, Aug 26, 2009 at 1:35 PM, Aaron P.  
\<removed\_email\_address@domain.invalid
