Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attaching Labels Using Paperclip #127

Open
davidcharlesweber opened this issue Feb 27, 2017 · 0 comments
Open

Attaching Labels Using Paperclip #127

davidcharlesweber opened this issue Feb 27, 2017 · 0 comments

Comments

@davidcharlesweber
Copy link

When attempting to attach a label with paperclip I am getting
Paperclip::AdapterRegistry::NoHandlerError

class Ticket < ActiveRecord::Base
    has_attached_file :fedex_label, content_type: { content_type: "application/pdf" }

I am putting my code here:

begin
     label = fedex.label(:filename => "tmp/#{@ticket.id}_ship_label.pdf",
                      :shipper=>shipper,
                      :recipient => recipient,
                      :packages => packages,
                      :service_type => "FEDEX_GROUND",
                      :shipping_options => shipping_options,
                      :label_specification => size_settings)
     @ticket.fedex_label = label.file_name
     @ticket.save!
     @track_number =  label.response_details[:completed_shipment_detail][:completed_package_details][:tracking_ids][:tracking_number].to_s
   rescue Fedex::RateError => e
     @fedex_error = e
   end

Is anyone else having a problem with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant