Error resizing images with Paperclip after images have been added
This is the code in my model:
has_attached_file :photo,
:styles => {
:tiny => "25x25#",
:t开发者_开发技巧humbnail => "50x50#",
:small => "150x150>",
:medium => "300x300>" },
:default_url => "/images/default_:style.jpg"
I run this command:
rake paperclip:refresh:thumbnails CLASS=Photo
and I get this error:
rake aborted!
uninitialized constant Photo
What going on? How can I fix this?
Obviously it doesn't know your model Photo. Try a command "require", e.g.
require "lib/photo"
or whatever your model path is.
精彩评论