spree-contrib / spree_print_invoice

Create a PDF invoice for Spree orders.
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
90 stars 241 forks source link

TypeError at /admin/orders/R837725288.pdf - "no implicit conversion of nil into String" #81

Open aruprakshit opened 9 years ago

aruprakshit commented 9 years ago

My Gemfile has the below version :

gem 'spree_print_invoice' , :git => 'git://github.com/spree/spree_print_invoice.git' , branch: '2-3-stable'

While, I am clicking the button -- print invoice, getting the error -

Started GET "/admin/orders/R837725288.pdf?template=invoice" for 127.0.0.1 at 2015-04-13 13:50:57 +0530
Processing by Spree::Admin::OrdersController#show as PDF
  Parameters: {"template"=>"invoice", "id"=>"R837725288"}
#.....
Rendered /Users/shreyas/.rvm/gems/ruby-2.1.2@collective/bundler/gems/spree_print_invoice-393bec83bfd6/app/views/spree/admin/orders/_print.pdf.prawn (20.2ms)
  Rendered /Users/shreyas/.rvm/gems/ruby-2.1.2@collective/bundler/gems/spree_print_invoice-393bec83bfd6/app/views/spree/admin/orders/invoice.pdf.prawn (27.7ms)
Completed 500 Internal Server Error in 47ms

TypeError - no implicit conversion of nil into String:
  prawn (1.0.0) lib/prawn/images.rb:144:in `verify_and_open_image'
  prawn (1.0.0) lib/prawn/images.rb:79:in `build_image_object'
  prawn (1.0.0) lib/prawn/images.rb:67:in `image'
   () Users/shreyas/.rvm/gems/ruby-2.1.2@collective/bundler/gems/spree_print_invoice-393bec83bfd6/lib/prawn_handler.rb:22:in `method_missing'
   () Users/shreyas/.rvm/gems/ruby-2.1.2@collective/bundler/gems/spree_print_invoice-393bec83bfd6/app/views/spree/admin/orders/_print.pdf.prawn:8:in `_411b913187c5f59f36c7bb34abf7ead6'
  actionview (4.1.4) lib/action_view/template.rb:145:in `block in render'
#...
MichaelSp commented 9 years ago

Are you sure that Spree::PrintInvoice::Config[:logo_path] is actually a valid image?