1

This is the code in my model:

has_attached_file :photo,
  :styles => {
    :tiny => "25x25#",
    :thumbnail => "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?

user730569
  • 3,940
  • 9
  • 42
  • 68

1 Answers1

0

Obviously it doesn't know your model Photo. Try a command "require", e.g.

require "lib/photo"

or whatever your model path is.

bender
  • 1,430
  • 10
  • 14