New environment: Failed to apply catalog:

HI All
I'm trying to setup a new environment called provisioning. We have modules
in /etc/puppet/modules and I've put updated version
in /etc/puppet/environments/provisioning/modules

I've set the test target to use the new environment but when going to apply
a class I get a message such as

May 20 06:52:58 testtesttest puppet-agent[18207]: Starting Puppet client
version 3.8.7
May 20 06:53:09 testtesttest puppet-agent[18211]: Could not autoload
puppet/provider/exec/powershell: undefined method require_relative' for main:Object May 20 06:53:09 testtesttest puppet-agent[18211]: Could not autoload puppet/type/exec: Could not autoload puppet/provider/exec/powershell: undefined methodrequire_relative' for main:Object
May 20 06:53:09 testtesttest puppet-agent[18211]: Could not retrieve
catalog from remote server: Could not intern from text/pson: Could not
autoload puppet/type/exec: Could not autoload
puppet/provider/exec/powershell: undefined method require_relative' for main:Object May 20 06:53:09 testtesttest puppet-agent[18211]: Using cached catalog May 20 06:53:09 testtesttest puppet-agent[18211]: Failed to apply catalog: Parameter unless failed on Exec[import-EPEL-6]: Validate method failed for class unless: undefined methodvalidatecmd' for nil:NilClass at
/etc/puppet/environments/production/modules/epel/manifests/rpm_gpg_key.pp:27
May 20 06:32:08 testtesttest puppet-agent[17813]: Failed to apply catalog:
Parameter unless failed on Exec[import-EPEL-6]: Validate method failed for
class unless: undefined method `validatecmd' for nil:NilClass at
/etc/puppet/environments/production/modules/epel/manifests/rpm_gpg_key.pp:27

Notice it uses the production path rather than the provisioning. I've set
the environment in puppet.conf

Any idea what is going on as the first errors I think are coming from not
finding ruby

If I set the environment back to production it all works fine

TIA

The master is in the "production" environment I guess? Those are type and
function errors, which are compiled on the master before being sent to the
client. Older versions of Puppet had issues with functions only existing in
environments the master had never used for itself, but I can't recall
exactly when it was fixed.

As a test, you could run "puppet agent --environment provisioning --noop"
on the master, which should hopefully cache the things it hasn't seen
before, and then retry your client.

Greg