1

I updated a thumbnail size for my Photo model.

Worked great on my local, and deployed it to production.

Unfortunately, even if I run reprocess on a specific Photo it still reprocesses to the old params.

If I check Photo.photo.styles it returns the correct new styles, but if I set that Photo to reprocess, it refuses to abide by the settings I applied.

How do I clear paperclip's cache? If it isn't paperclip that's caching it, what possibly could be doing that?

I'm not using delayed_jobs to do this, but I have restarted that as well.

Any ideas?

Trip
  • 26,756
  • 46
  • 158
  • 277

1 Answers1

1

The error was caused by my browser caching the old style. To resolve this, I went into the haml, and added a random URI:

= image_tag @image.photo(:format) + "?" + rand(9999)

A slight hackery as my application has turned off the default timestamped URI's. Maybe that's your problem as well. Equally, I also noticed that when I tried to run refresh on a large group of objects it would fail..

Then what I did was posted this question:

Can you identify the current dimensions of an image with Paperclip?

And made a select statement where I found whichever photo wasn't reprocessed yet, and to reprocess it. I was working with roughly 25,000 photo objects.

Community
  • 1
  • 1
Trip
  • 26,756
  • 46
  • 158
  • 277
  • Thanks for reply however this doesn't seem to be the problem in my case. – mark Aug 24 '11 at 15:53
  • Hmm.. post up your question, and comment it here. i'd be happy to take a look more into your situation specifically. – Trip Aug 25 '11 at 01:44
  • Thanks trip, I found what it was. I'm running a staging environment on the same server with the same db. Using delayed job with paperclip seemed not to be able to distinguish which application to use, specifically geometry. Thanks again! – mark Aug 25 '11 at 07:15