开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜