Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method most_appropriate_url with Paperclip 2.4.5 #54

Open
rnaud opened this issue Jan 9, 2012 · 12 comments
Open

undefined method most_appropriate_url with Paperclip 2.4.5 #54

rnaud opened this issue Jan 9, 2012 · 12 comments

Comments

@rnaud
Copy link

rnaud commented Jan 9, 2012

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
Copy link

basayel commented Jan 17, 2012

same here, Anyone reached a solution?

@aguilarsoto
Copy link

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
Copy link

basayel commented Jan 17, 2012

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

@maxigs
Copy link

maxigs commented Jan 19, 2012

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
Copy link

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
Copy link

atd commented Jan 23, 2012

Same problem here.

@aguilarsoto a patch will be warmly welcomed!

@aguilarsoto
Copy link

Hi gents,

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

aguilarsoto@c4d3612

Regards,
Marco

@aguilarsoto
Copy link

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

@jamesearl
Copy link

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
Copy link

tdelam commented Apr 2, 2012

+1 I too have the same issue

@tommeier
Copy link
Collaborator

tommeier commented Apr 2, 2012

Fixed in : #62

@amitsaxena
Copy link

+1
I have the same problem with paperclip version 2.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants