replacing rails dependency with activerecord, should fix #82