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. 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?