title: Puppet Does not load class in custom module
body: <p>A beginner environment with Puppet(3.8.4)+Apache(2.2.15)+Passenger on CentOS6.5
  An agent run returns with </p>
  
  <blockquote>
    <p>Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve 
        information from environment production source(s)<br>
        puppet://puppetmaster/plugins 
        Error: Could not retrieve catalog from remote server: Error 400 on SERVER:<br>
        Puppet::Parser::AST::Resource failed with error ArgumentError: Could not 
        find declared class mediawiki at 
        /etc/puppet/environments/production/manifests/nodes.pp:10 on node wikitest</p>
  </blockquote>
  
  <p>This is sequence of installing the module:</p>
  
  <pre><code>$&gt;sudo puppet module generate my-mediawiki --environment production
  $&gt;sudo mv my-mediawiki mediawiki (just renaming the folder)
  $sudo puppet module list
  /etc/puppet/modules (no modules installed)
  /usr/share/puppet/modules (no modules installed)
  </code></pre>
  
  <p>I have tried adding <code>$confdir/environments/production/modules</code> to <code>environment.conf</code> of the production environment and 
  to the <code>basemodulepath</code> in <code>puppet.conf</code> as the first entry, but it doesn't seem to be looking there.
  <code>$confdir/environments/production/modules/mediawiki/manifests/init.pp</code> has the empty class declaration. '$confdir/environments/production/nodes.pp` 
  has the class statements in both nodes and both have the same error.</p>
  
  <p>I've already tried:</p>
  
  <p>1) removing the module and trying again, with all the puppet service stopped/started etc</p>
  
  <p>2) there are no spelling or quotation mark errors</p>
  
  <p>3) I've modified <code>metadata.json</code> in the <code>mediawiki</code> folder to be same as folder name just in case that mattered, but no luck.
  4) Certificates are fine, communication is fine. I have another class defined as resource within the <code>nodes.pp</code> file and that runs fine.</p>
  
  <p>Any help appreciated!</p>