weblog.masukomi.org

mah-soo-koh-me

 

AWS::S3 + Dreamhost == Error December 17, 2006

Filed under: Uncategorized — masukomi @ 4:40 pm

If you’re like me and you’re on Dreamhost and trying to do an upload to Amazon’s s3 using the AWS::S3 library, you may encounter the following bug:

undefined method `body=' for #
 [RAILS_ROOT]/vendor/plugins/aws/lib/aws/s3/connection.rb:37:in `request’

Now, obviously there is a body= method. Why it can’t find see it is something I haven’t determined. But I’m working on a live app so it was more important to get things working than to worry about obscure bugs in Dreamhost’s servers (It works on three other servers I’ve tried it on). So, how’d I solve it? Well, I’d been working on this app before AWS::S3 was released, and the best looking library at the time was s33r. It’s not in as polished of a state as AWS::S3 but it works, and in this case it has the distinction of working on Dreamhost too.

On a related side note, s33r can also generate a protected url for your s3 resource without having to make a connection to S3. It doesn’t appear to be possible to do anything with AWS::S3 without first starting up a connection. And when all you’re doing is generating an url it seems silly to make a connection that is completely unnecessary.

 

Leave a Reply