gds-operations/puppet-rbenv — pull request #8 by philandstuff (2013-08-07 13:52:32+00:00)
Title: Allow installation of bundler even when puppet is within rbenv

If puppet is being run from within rbenv, then it will have been set
the PATH variable to have the configured ruby version first in the
PATH. This means that even if you change the RBENV_VERSION variable,
gem commands will use the current rbenv-configured ruby rather than
the new one, and rbenv::version will install bundler into puppet's own
rbenv ruby, rather than the one it is installing in rbenv::version.

We fix this by scrubbing the PATH of rbenv ruby versions when running
gem commands.

Fixes #7.