Inheritance problem on site5


I’ve uploaded my web application to site5 recently and I’ve encountered
big inheritance problem.

My application has an abstract model Media that is inherited by several
other models (such as Post, Picture, Event). I’ve created this structure
order to use only one controller for the comments on these classes. As
of these classes allow users to upload a picture on amazon s3 using
Paperclip, I’ve put the has_attachment attribute inside my Media model,
the validates_attachment_presence attribute only on the models that
use it.

The problem I have is that, as opposed to when I used my personal
as the Rails server, on site5 any of the classes inheriting Media and
do not have an attachment displays an error when I submit the create or
form, to warn me that the attachment Image must be present.

Why do I have this error message, although I’m pretty confident that my
configuration is correct ?

Thank you for your help, and excuse my English (if you didn’t understand
part of the above, don’t hesitate to ask precisions)


With most dev-to-live problems, first we need to check what versions of
Rails is used in both environment… Then try to run your application on
your dev machine with the live version of Rails ?

Did you try to change the environment in your computer from
development to production and run the application that way? Maybe the
problem is seeing only in production mode and you can reproduce it.