reconnect ActiveRecord when changing environment