fix: running main in an ActiveRecord::Base transaction