Rails 4

It seems there is still a lot of work, but here is a quick fix: the installation now succeeds, even with polymorphic associations, and the admin pannel displays ok (ActiveRecord).

Warning: I couldn't try the tests because of a conflict with carrierwave-mongoid's dependencies (I am not used to MongoDB and the gem doesn't support Rails4 at the moment.)