here is my controller action:

def create
   UploadWorker.async_send_file(params[:image])

 flash[:notice] = "uploading file"
 redirect_to root_url
 end

class UploadWorker < Workling::Base
  def send_file(options)
     @image = current_user.images.build(params[:image])
     @image.save
  end
end

I would like the paperclip upload, conversion and save to take place in
the background.
The error I get:

can't dump File


/usr/lib/ruby/gems/1.8/gems/memcache-client-1.8.5/lib/memcache.rb:360:in
`dump'
/usr/lib/ruby/gems/1.8/gems/memcache-client-1.8.5/lib/memcache.rb:360:in
`set_without_newrelic_trace'
(eval):5:in `set'
(eval):4:in `set'
app/controllers/images_controller.rb:52:in `create'


{"commit"=>"upload",
 "authenticity_token"=>"3JniM+vyc29t+23lnQjm0RNjrzV37YswhK/fauMfEZY=",
 "image"=>{"photo"=>#<File:/tmp/RackMultipart20100814-12328-bwjqb8-0>,
 "location"=>"",
 "uid"=>"upload_workers:send_file:37ec9541ff9c36d5a7ac802822316d77",
 "description"=>"",
 "state_id"=>"1"}}
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to