puppet resource generates Ruby errors after connecting puppet apply to PuppetDB

If puppet apply is configured incorrectly, then puppet resource ceases to function and returns a Ruby run error.

An example of an incorrect puppet apply configuration would be putting the storeconfigs_backend = puppetdb and storeconfigs = true parameters in both the main and primary server sections of the puppet.conf file.

You need to modify the routes.yaml file (located at /etc/puppetlabs/puppet/routes.yaml) so that it correctly connects puppet apply without impacting other functions.