install Rubygem-package on a machine without Rubygems preinstalled, "Provider gem is not functional on this host"

758 views
Skip to first unread message

Ingo Fischer

unread,
May 10, 2012, 5:43:58 PM5/10/12
to puppet...@googlegroups.com
On a clean Debian system - without Rubygems installed - I want to install a Rubygem package (ruby-ldap) with Puppet. So the package has "gem" as package Provider. 

This is my manifest so far (I kept it simple):

    # test.pp
    Package { ensure => 'installed' } 

    package { 
      'rubygems' : 
        name => 'rubygems',
    }
    
    package {
      'libldap-ruby1.8' :
        name => 'libldap-ruby1.8',
    }
    
    package { 'libldap2-dev' : 
       name => 'libldap2-dev', 
    }
    
    package { 'libsasl2-dev' : 
      name => 'libsasl2-dev', 
    }
    
    package { 'libsasl2-modules-ldap' : 
      name => 'libsasl2-modules-ldap', 
    }
    
    # My Rubygem, with Provider type 'gem'
    package { 
      'ruby-ldap' : 
        name => 'ruby-ldap',
        provider => 'gem',
    }
    
    Package [ 'rubygems' ] -> Package [ 'ruby-ldap' ] 
    Package [ 'libldap2-dev' ] -> Package [ 'ruby-ldap' ]
    Package [ 'libsasl2-modules-ldap' ] -> Package [ 'ruby-ldap' ]

When I test this manifest (with `puppet apply --noop test.pp`), I'm getting the following output:

    err: /Stage[main]//Package[ruby-ldap]: Provider gem is not functional on this host

I also tried using classes and stages (doing the rubygem install in a stage before the gem install) but I always got the `Provider gem`-error (but maybe I just used the stages in a wrong way). 

How can I install Rubygems packages on a system without Rubygems preinstalled?


Ingo Fischer

unread,
May 19, 2012, 7:28:37 AM5/19/12
to puppet...@googlegroups.com
Since I'm getting no answer here, I get the impression that installing Rubygems with Puppet on a system without Rubygems preinstalled is not possible.

Are there at least any workarounds?

Nan Liu

unread,
May 19, 2012, 12:06:14 PM5/19/12
to puppet...@googlegroups.com
On Sat, May 19, 2012 at 4:28 AM, Ingo Fischer
<ingo.f...@profitbricks.com> wrote:
> Since I'm getting no answer here, I get the impression that installing
> Rubygems with Puppet on a system without Rubygems preinstalled is not
> possible.
>
> Are there at least any workarounds?

This should be fixed in 2.7.8:
http://projects.puppetlabs.com/issues/6907

What version are you using?

Thanks,

Nan

Ingo Fischer

unread,
May 20, 2012, 11:13:45 AM5/20/12
to puppet...@googlegroups.com
Thanks for the issue, now I know that there at least has been an error in relation to my problem.
But its strange, as I got the error with 2.7.13.
I just retried it on another machine with 2.7.14 installed, there it works (successfully installed Rubygems and a Gem at once).
So I'll just upgrade to 2.7.14.

Thanks again!
Cheers,
Ingo
Reply all
Reply to author
Forward
0 new messages