undefined method `queue_existing_for_delete' when trying to destroy a model with attachments

Skip to first unread message


May 17, 2012, 10:51:46 PM5/17/12
to Paperclip Plugin
I have a model, "Person", that has an attached file ":photo":

> has_attached_file :photo, :styles => { :medium => "180x150#", :small => "80x50#" },
> :default_url => "/photos/missing.png",
> :url => "/images/:attachment/:id_:style.:extension",
> :path => ":rails_root/public/images/:attachment/:id_:style.:extension"

When I try to call the "delete" method on a Person, I get this error:

NoMethodError in PeopleController#destroy

undefined method `queue_existing_for_delete' for /images/photos/

Even if I have no image attached, I get the same error as above with "/
photos/missing.png" in place of the image path.

Everything else works that I've tried to do with Paperclip other than

Any help would be appreciated.

Jason Wintersteller

May 22, 2012, 9:47:36 AM5/22/12
to papercli...@googlegroups.com

I figure out my problem. I made an entirely new Rails app with just one model, installed the Paperclip gem and attached photos to the model. It all worked.

When I started to hunt for differences between the new app and my existing app, I noticed that I had Paperclip installed both as a gem and as a plugin in my existing app (and just as a gem in the new app).

I deleted the plugin from my existing app (leaving just the gem) and it all works now. All aspects other than deleting worked with both installed, but apparently deleting crossed the wires.
Reply all
Reply to author
0 new messages