When I am saving my konkurrencer model with a attached image I get a error on Heroku, but not on my local server.
. My heroku log:
←[36m2012-04-01T17:45:37+00:00 app[web.1]:←[0m Started POST "/admin/konkurrencer
s" for MYIP at 2012-04-01 10:45:37 -0700
←[33m2012-04-01T17:46:01+00:00 heroku[router]:←[0m POST www.konkurrencerher.dk/a
dmin/konkurrencers dyno=web.1 queue=0 wait=0ms service=24565ms status=500 bytes=
728
←[32m2012-04-01T17:46:01+00:00 heroku[nginx]:←[0m MYIP - - [01/Apr/201
2:17:46:01 +0000] "POST /admin/konkurrencers HTTP/1.1" 500 728 "http://www.konku
rrencerher.dk/admin/konkurrencers/new" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:1
1.0) Gecko/20100101 Firefox/11.0" www.konkurrencerher.dk
←[36m2012-04-01T17:46:01+00:00 app[web.1]:←[0m
←[36m2012-04-01T17:46:01+00:00 app[web.1]:←[0m AWS::S3::Errors::RequestTimeout (
Your socket connection to the server was not read from or written to within the
timeout period. Idle connections will be closed.):
My photo model:
class Photo < ActiveRecord::Base
belongs_to :konkurrencer
attr_accessor :image_url, :billed_navn
# Paperclip.options[:command_path] = "/usr/local/bin"
has_attached_file :image,
:storage => :s3,
:bucket => 'konkurrencerher',
:styles => { :original => ["300x250>", :png], :small => ["165x138>", :png], :mini => ["120x120>", :png] },
:path => 'images/vind/:style/:id/:basename.:extension',
:url => ":s3_path_url",
:s3_credentials => {
:access_key_id => 'x',
:secret_access_key => 'x'
}
It works fine on my local server.
I am usng the Heroku stack bamboo-mri-1.9.2 and the verison of rails is 3.0.9
There is a problem with the current version paperclip 3.0.1:
https://github.com/thoughtbot/paperclip/issues/721
and
https://github.com/thoughtbot/paperclip/issues/751
Did solve this using version 2.7 of paperclip.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With