Configures activerecord version

Also removes some deprecation warnings