Why does paper clip processing not work?

Hello, I was looking through all the various tutorials for post-processing PostScript, but somehow I cannot force the Make method to call.

Take a look at line 36 here ... http://pastie.org/private/epfgcxywhyh4wpmozypg

It loads normally without any errors or warnings, but I can never see the puts statement in the make method, which tells me that it is not being called.

EDIT

I can run this in the model without problems and get True,

def class_exists?(class_name)
   klass = Paperclip.const_get(class_name)
   return klass.is_a?(Class)
rescue NameError
   return false
end

Any ideas?

+3
source share
2 answers

Two days ago I ran into the same problem. Here is what I did to make it work:

"which convert". ImageMagick, , /usr/bin/convert,

Paperclip.options[:command_path] = "/usr/bin"

//development.rb. / , .

file_contents.rb paperclip_postprocess.rb : RAILS_ROOT/config/initializers/paperclip_postprocess.rb

, , :

   before_post_process :before_post_process
   after_post_process :after_post_process

   def before_post_process
        puts "===========Before processing attachment==========="
   end

   def after_post_process
        puts "-----------After processign attachment------------"
   end

.

+4

"" README:

. , , , .

, , :style, , , ?

0

All Articles