jstorimer / delayed_paperclip

Process your Paperclip attachments in the background with delayed_job or Resque.
https://github.com/jrgifford/delayed_paperclip/
392 stars 245 forks source link

undefined method most_appropriate_url with Paperclip 2.4.5 #54

Open rnaud opened 12 years ago

rnaud commented 12 years ago

Hello !

Here is my bug :

/Users/rnaud/.rvm/gems/ruby-1.9.2-p290/bundler/gems/rails-b7c7f08c87a8/activesupport/lib/active_support/core_ext/module/aliasing.rb:31:in alias_method': undefined methodmost_appropriate_url' for class `Paperclip::Attachment' (NameError)

using in my gem file : Using paperclip (2.4.5) from git://github.com/thoughtbot/paperclip.git (at master) Using delayed_paperclip (2.4.5.1) from git://github.com/jstorimer/delayed_paperclip.git (at master)

basayel commented 12 years ago

same here, Anyone reached a solution?

aguilarsoto commented 12 years ago

I got that same problem when using paperclip 2.5 but when reverting it back to 2.4.5 I got it working again.

basayel commented 12 years ago

Changing paperclip to 2.4.5 made it work! .. Thanks @aguilarsoto alot

maxigs commented 12 years ago

with commented out line:

#base.alias_method_chain :most_appropriate_url, :processed

the processing seems to work fine as well as the url output (as far as i tested as part of a project) i tested against the current master of the paperclip repo (with the same error before).

i dont really know where to start looking for the root cause but this way paperclip and delayed-paperclip at least work togeter again in the latest version for who else needs it to

aguilarsoto commented 12 years ago

the short answer is that the most_appropriate_url was moved from the attachment to the url_generator and probably the call is different now, when i got a spare minute I can probably came up with a patch for delayed_paperclip

lib/paperclip/attachment.rb: def most_appropriate_url

is moved to

lib/paperclip/url_generator.rb: def most_appropriate_url

regards, Marco Aguilar

atd commented 12 years ago

Same problem here.

@aguilarsoto a patch will be warmly welcomed!

aguilarsoto commented 12 years ago

Hi gents,

the fix has being submited as a pull request its a simple change if you want to see it here it is.

https://github.com/aguilarsoto/delayed_paperclip/commit/c4d361282d277753f8ea39848e12578fbed63289

Regards, Marco

aguilarsoto commented 12 years ago

seems like I made a mistake here... fixing it now....

jamesearl commented 12 years ago

I'm still having this issue with 2.7

/home/james/dev/baus/paperclip/ruby/1.8/gems/activesupport-3.1.3/lib/active_support/core_ext/module/aliasing.rb:31:in alias_method': undefined methodmost_appropriate_url' for class `Paperclip::Attachment' (NameError)

paperclip (2.7.0) activerecord (>= 2.3.0) activesupport (>= 2.3.2) cocaine (>= 0.0.2) mime-types

tdelam commented 12 years ago

+1 I too have the same issue

tommeier commented 12 years ago

Fixed in : https://github.com/jstorimer/delayed_paperclip/pull/62

amitsaxena commented 12 years ago

+1 I have the same problem with paperclip version 2.6.0