Ensure requiring active_record, fix #1247
Merge pull request #1306 from udzura/patch-2

Ensure requiring active_record, fix #1247