I was having a bit of trouble with CarrierWave on Amazon S3 today. When attempting to upload files that were larger than ~150kb I received one of the following errors (depending on config):
Broken pipe (Errno::EPIPE)
Despite the vague error, the solution was fairly simple. The region configured in my initialiser was different to the one my bucket was created in.
In order to find out which region you need, logon to your AWS console and browse to an uploaded image. Check the endpoint URL (properties > static website hosting) and simply copy the region. For examples:
A couple of final tips if this doesn’t work for you: