Before writing this question I looked at these answers, but was unable to find a solution.:
Error when execute rails generate scaffold User name:string email:string>
If you don't see config.active_record.raise_in_transactional_callbacks = true in config/application.rb it might exist in your environment configs. For my app it was being set it in config/environments/development.rb and config/environments/test.rb
config.active_record.raise_in_transactional_callbacks = true
config/application.rb
config/environments/development.rb
config/environments/test.rb