Fwd: newbie => Ruport::Formatter::TemplateNotDefined: Ruport::Formatter::TemplateNotDefined error ?

68 views
Skip to first unread message

PAVAN

unread,
Feb 29, 2012, 3:31:52 PM2/29/12
to ruby-r...@googlegroups.com


---------- Forwarded message ----------
From: PAVAN <meet...@gmail.com>
Date: Tue, Feb 28, 2012 at 3:43 PM
Subject: newbie => Ruport::Formatter::TemplateNotDefined: Ruport::Formatter::TemplateNotDefined error ?
To: ruby-r...@googlegroups.com


Hi, 

I am playing around with Ruport and trying out the example. Here is the code that I copied from the documentation:

require "rubygems"
require "ruport"
require "ruport/util"

  class GraphReport < Ruport::Report
    renders_as_graph
    def renderable_data(format)
      graph = Graph(%w[a b c d e])
      graph.series [1,2,3,4,5], "foo"
      graph.series [11,22,70,2,19], "bar"
      return graph
    end
  end
  GraphReport.generate do |r|
    r.save_as("foo.svg", :template => :graph)
  end

I have installed ruport, ruport-util,Gruff. I get the following error:
 JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
Ruport::Formatter::TemplateNotDefined: Ruport::Formatter::TemplateNotDefined
              [] at /home/pboob/.gem/jruby/1.8/gems/ruport-1.6.3/lib/ruport/formatter/template.rb:180
        template at /home/pboob/.gem/jruby/1.8/gems/ruport-1.6.3/lib/ruport/formatter.rb:182
  apply_template at /home/pboob/.gem/jruby/1.8/gems/ruport-util-0.14.0/lib/ruport/util/graph/scruffy.rb:56
           _run_ at /home/pboob/.gem/jruby/1.8/gems/ruport-1.6.3/lib/ruport/controller.rb:565
             run at /home/pboob/.gem/jruby/1.8/gems/ruport-1.6.3/lib/ruport/controller.rb:520
          render at /home/pboob/.gem/jruby/1.8/gems/ruport-1.6.3/lib/ruport/controller.rb:436
              as at /home/pboob/.gem/jruby/1.8/gems/ruport-1.6.3/lib/ruport/controller.rb:173
              as at /home/pboob/.gem/jruby/1.8/gems/ruport-util-0.14.0/lib/ruport/util/report.rb:95
         save_as at /home/pboob/.gem/jruby/1.8/gems/ruport-util-0.14.0/lib/ruport/util/report.rb:109
            open at org/jruby/RubyIO.java:1111
         save_as at /home/pboob/.gem/jruby/1.8/gems/ruport-util-0.14.0/lib/ruport/util/report.rb:109
          (root) at /home/pboob/scripts/ruby/pavan_scripts/test:20
        generate at /home/pboob/.gem/jruby/1.8/gems/ruport-util-0.14.0/lib/ruport/util/report.rb:126
          (root) at /home/pboob/scripts/ruby/pavan_scripts/test:19
            load at org/jruby/RubyKernel.java:1063
          (root) at -e:1

Is the :graph template not defined or changed ? . What am I missing ? 

Also I have following questions about Ruport and would appreciate if someone can help me here :
1] Can I generate graphs directly to a file without using UI . I tend to use putty/NX etc to run scripts overnight. 
2] Can I generate multiple graphs in parallel [batch ?] . Hopefully I can just create multiple threads in a code and have them generate graphs ?

Thanks for the support !

Regards,
Pavan





--
Regards,
Pavan
Reply all
Reply to author
Forward
0 new messages