1

I'm trying to used delayed_paperclip to process image resize in the background. This process works in development but in production I get this in my delayed job's last error.

missing required :bucket option\n/home/server_username/project_folder_name/shared/bundle/ruby/2.2.0/gems/paperclip-4.3.0/lib/paperclip/storage/s3.rb:218:in 'bucket_name'...etc

In application.rb

config.paperclip_defaults = {
      :storage => :s3,
      :url =>':s3_domain_url',
      :s3_protocol => 'https',
      :path => '/:class/:attachment/:id_partition/:style/:filename',
      :bucket => ENV['s3_bucket_name'],
      :s3_credentials => {
        :access_key_id => ENV['s3_id'],
        :secret_access_key => ENV['s3_key']
      }
    }

In my class file

  has_attached_file :uploaded_file,
      :styles => { original: "990x990#",large: "300x300#", medium: "200x200#", thumb: "100x100#"},
          only_process: [:medium]

  process_in_background :uploaded_file, queue: "queue_name",
      only_process: [:original, :large, :thumb]

Uploading to s3 works without using delayed_paperclip. I just wanted to use this library so people didn't have to wait for these to be uploaded/resiszed. I'm working on Ubuntu14.04. Deploying w/ Capistrano.

I saw a couple places that the bucket should be outside of the s3_credentials, so I moved it to where it is now. So I've tried it there and inside s3_credentials -- no change either way.

The medium image is uploaded and resized immediately and works.

Let me know if there is some info I didn't provide.

0 Answers0