delayed_paperclip icon indicating copy to clipboard operation
delayed_paperclip copied to clipboard

undefined method most_appropriate_url with Paperclip 2.4.5

Open rnaud opened this issue 13 years ago • 12 comments

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)

rnaud avatar Jan 09 '12 15:01 rnaud

same here, Anyone reached a solution?

basayel avatar Jan 17 '12 12:01 basayel

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

aguilarsoto avatar Jan 17 '12 13:01 aguilarsoto

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

basayel avatar Jan 17 '12 16:01 basayel

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

maxigs avatar Jan 19 '12 21:01 maxigs

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

aguilarsoto avatar Jan 19 '12 22:01 aguilarsoto

Same problem here.

@aguilarsoto a patch will be warmly welcomed!

atd avatar Jan 23 '12 15:01 atd

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 avatar Jan 29 '12 17:01 aguilarsoto

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

aguilarsoto avatar Jan 30 '12 13:01 aguilarsoto

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

jamesearl avatar Mar 04 '12 01:03 jamesearl

+1 I too have the same issue

tdelam avatar Apr 02 '12 14:04 tdelam

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

tommeier avatar Apr 02 '12 21:04 tommeier

+1 I have the same problem with paperclip version 2.6.0

amitsaxena avatar May 11 '12 13:05 amitsaxena