I have a module located at /etc/puppet/environments/test/modules/ruby.
I
n this I have a manifests folder with two .pp files - init.pp and 
gemInstall.pp.

In one of my node def files I have:

include ruby

ruby::gemInstall { 'someGem-version.gem':
  path => '/path/to/agent/local/gem/repo',
}

ruby::gemInstall  is a define, and it has some logic to get around some 
problems I had when trying to install gems via a package resource, the 
source is below.

define ruby::gemInstall (
  gem = $title,
  path = hiera('v_rubygem_path')

  ) {
  $gemName = regsubst($gem, '([^-]+)-.*\.gem', '\1')

  exec {"/usr/local/bin/gem install ${gem}":
    cwd     => $path,
    unless  => "gem list -i ${gemName}",
    require => Package['rubygems'];
  }
}

But when I try to apply this, I get the following:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid 
resource type ruby::gemInstall at 
/etc/puppet/environments/test/manifests/nodes/MyNodeDef.pp:84 on node XX

Am I doing something wrong when it comes to auto-loading classes and 
defines, or is this an instance of this bug 
(http://projects.puppetlabs.com/issues/13858) cropping up?

Thanks.


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/NBiTSrN-8PQJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to