Require 'active_record/base' in rake task

This may cause `Rails.application.config.active_record` inside of
an initializer no effects.
Merge pull request #530 from yahonda/backport_526_to_master

Require 'active_record/base' in rake task