[Backgroundrb-devel] attachment_fu, aws-s3 and backgroundrb

hemant gethemant at gmail.com
Wed Nov 12 01:59:27 EST 2008


On Tue, Nov 11, 2008 at 7:26 PM, Shaggy Moe <shagymoe at yahoo.com> wrote:
> Hi,
>
> I'm using attachment_fu to store files on amazon s3.  A background job is currently performing the upload and I'm having a strange issue where the very first file uploaded/created (attachment_fu uploads when creating the object) does not get uploaded.  The db information is all all good. The model and attachment model associated with it are saved to the db, but the file is not uploaded. However, every subsequent file is uploaded successfully with no issues.
>
> It seems that maybe the rails environment isn't being loaded on the first shot, but the load_worker_env.rb file has the line: require RAILS_HOME + "/config/environment"
>
> Any suggestions? I've tried manually adding 'require aws-s3' to the load_worker_env.rb file and it didn't work.  Is it maybe something with attachment_fu not getting loaded or maybe the attachment_fu config file?
>
> Thanks for the help.

Is the request coming to bdrb worker? (put some logger statements)
Also, can you paste your worker code and how are you invoking upload
task in worker from rails?


More information about the Backgroundrb-devel mailing list