Skip to content

Attaching Labels Using Paperclip #127

Description

@davidcharlesweber

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?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions