Rank traps ActiveRecord only if defined

[fixes #181]
Merge pull request #188 from tute/mongo-test

Test Rank exception in other ORMs