Executing InvoiceReport example fails in 1.9.2p180 #11

Closed
halfdan opened this Issue Jul 11, 2011 · 2 comments

Comments

Projects
None yet
2 participants

halfdan commented Jul 11, 2011

I just installed ruport

gem install ruport ruport-util

Then I copied the invoice_report.rb from the examples (/usr/local/rvm/gems/ruby-1.9.2-p180@pdfkit/gems/ruport-util-0.14.0/example/invoice_report.rb) to my working directory and tried to execute it.

$ ruby invoice_report.rb 
/usr/local/rvm/gems/ruby-1.9.2-p180@pdfkit/gems/ruport-util-0.14.0/lib/ruport/util/graph/amline.rb:105: warning: undefining `object_id' may cause serious problems
/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- generator (LoadError)
    from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@pdfkit/gems/ruport-util-0.14.0/lib/ruport/util/query.rb:13:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
    from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
    from /usr/local/rvm/gems/ruby-1.9.2-p180@pdfkit/gems/ruport-util-0.14.0/lib/ruport/util.rb:22:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:58:in `require'
    from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:58:in `rescue in require'
    from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from invoice_report.rb:2:in `<main>'

I am using Ruby 1.9.2p180 with rvm. Installed gem versions of ruport are:

ruport (1.6.3)
ruport-util (0.14.0)

Any idea?

Collaborator

Odaeus commented Jul 11, 2011

Hi,

Ruport compatibility with Ruby 1.9 is currently being worked on, you can
see the discussion in a thread on this list from about 2 days ago.

I'm afraid ruport-util is pretty much deprecated anyway. It's very
unlikely that the gem will be upgraded unless someone is interested in
doing so. The invoice example wouldn't work anyway due to the PDF Writer
gem not being 1.9 compatible. Although it's actually failing a lot
earlier than that due to a require "generator" in
lib/ruport/util/query.rb that I have no idea about.

You can use most of Ruport in 1.9 except you'd need to use Prawn for PDF
generation. I expect to have a test release available within a week or
so. Please use 1.8.x if you can for the moment.

Regards,
Andrew

On 11/07/11 17:27, halfdan wrote:

I just installed ruport

 gem install ruport ruport-util

Then I copied the invoice_report.rb from the examples (/usr/local/rvm/gems/ruby-1.9.2-p180@pdfkit/gems/ruport-util-0.14.0/example/invoice_report.rb) to my working directory and tried to execute it.

$ ruby invoice_report.rb
/usr/local/rvm/gems/ruby-1.9.2-p180@pdfkit/gems/ruport-util-0.14.0/lib/ruport/util/graph/amline.rb:105: warning: undefining `object_id' may cause serious problems
/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- generator (LoadError)
  from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
  from /usr/local/rvm/gems/ruby-1.9.2-p180@pdfkit/gems/ruport-util-0.14.0/lib/ruport/util/query.rb:13:in `<top (required)>'
  from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
  from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:54:in `require'
  from /usr/local/rvm/gems/ruby-1.9.2-p180@pdfkit/gems/ruport-util-0.14.0/lib/ruport/util.rb:22:in `<top (required)>'
  from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:58:in `require'
  from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:58:in `rescue in require'
  from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
  from invoice_report.rb:2:in `<main>'

I am using Ruby 1.9.2p180 with rvm. Installed gem versions of ruport are:

 ruport (1.6.3)
 ruport-util (0.14.0)

Any idea?

Avito Ltd

Currently in Cambridge, UK (BST)

Reg office: 23 Hoadly Road, Cambridge, CB3 0HX.

Company 05946211 registered in England.

halfdan commented Jul 15, 2011

Hi,
thanks for your response. Hopefully 1.9 compatibility is available soon, I can't (and don't want to) revert back to 1.8.x.

Cheers,
Fabian

halfdan closed this Jul 15, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment