Rank traps ActiveRecord only if defined

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

Test Rank exception in other ORMs
Testing against minitest 5 / Rails 4.1