Ask Your Question

Using puppet with bundler causes bundle install problems

asked 2014-06-09 08:00:14 -0600

obduk gravatar image

Summary: I am trying to install puppet via bundler which works, but when I execute a bundle install in a module, that fails.

Details: So I am currently trying to switch to installing puppet with bundler, the reason for this is:

  • I don't use puppet server, so don't need all the ssl and other things that come with the package
  • I need other gems like ruby-shadow and librarian-puppet so this seems like a nice way to install everything
  • It's a nice way to keep the same version on different versions of operating system

I have managed to set up the project to use bundler (e.g.

The problem is, when I try and do a bundle install in a module, it fails, e.g.

class mailcatcher::install {
  exec { 'mailcatcher bundle install':
    command     => '/usr/local/bin/bundle install --gemfile /opt/mailcatcher/Gemfile --path /opt/mailcatcher/vendor/bundle',
    refreshonly => true,

This is because a sub exec of bundle is modified by the environment, see

It is possible to fix it by modifying the various path variables, but this seems a bit messy.

Has anyone else had experience with this, or have any suggestions of a nicer way of doing it?

Thanks, Owen

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-06-09 12:44:28 -0600

Have you tried This module from the Puppet Labs Operations team ought to simplify things for you.

edit flag offensive delete link more

answered 2014-06-15 16:02:15 -0600

obduk gravatar image

I gave that a go but it does not work (also it relies on ruby 1.8).

I have found a commit for what is probably the problem:

But cannot work out why this is not working still. I am using puppet version 3.6.1.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2014-06-09 08:00:14 -0600

Seen: 1,053 times

Last updated: Jun 15 '14