Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
-
Puppet Developer Experience
-
Inspection
-
Bug Fix
-
When running PDK from a gem install, PDK will no longer override an existing user specified bundler gem install path. This allows PDK in bundler setups (eg {{bundl e exec pdk validate}}) to work correctly.
-
Needs Assessment
Description
When the `bundle install --path .bundle\gems` command is run for a PDKified module, the pdk gem is installed in that path.
If a user then runs a command likeĀ `bundle exec pdk build` the pdk gem does not appear to respect the bundle path. It will attempt to look in a self determined path for gems. When it does not find the gems, it will overwrite the bundle\config file to point to the path it had looked in and found nothing. This means that subsequent non-pdk commands like `bundle exec puppet --version` will also fail.
The only way to get bundle to work properly again is to execute `bundle install --path .bundle\gems` again. It will find all the gems where they should be and re write the bundle\config file.
The only way I have found to get pdk gem commands to work is to deliberately set the bundle path on install manually to the path the pdk expects to find gems.
The error and the path where pdk is looking for gems are in the error snippet below.
pdk (INFO): Building puppetlabs-windows version 5.0.0
|
C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/spec_set.rb:91:in `block in materialize': Could not find rake-12.3.1 in any of the sources (Bundler::GemNotFound)
|
from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/spec_set.rb:85:in `map!'
|
from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/spec_set.rb:85:in `materialize'
|
from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/definition.rb:171:in `specs'
|
from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/definition.rb:238:in `specs_for'
|
from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/definition.rb:227:in `requested_specs'
|
from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:108:in `block in definition_method'
|
from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:20:in `setup'
|
from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler.rb:107:in `setup'
|
from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/setup.rb:20:in `<top (required)>'
|
from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:59:in `require'
|
from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:59:in `require'
|
Attachments
Issue Links
- blocks
-
MODULES-7861 Puppetlabs-windows: Remove the pin to PUPPET_GEM_VERSION 5.5.6
-
- Closed
-