Closed luksi1 closed 6 years ago
I don't see the path /usr/local/bundle
on any of my systems. Are you sure
this isn't something particular to your container image?
My container is from the Ruby library on dockerhub, https://hub.docker.com/_/ruby/, which uses /usr/local/bundle/bin.
I'm using Ruby 2.3. If this isn't something that the project is considering supporting, feel free to close this issue.
@luksi1 it might help to run a supported version of ruby for your version of Puppet. Puppet v4 uses Ruby 2.1.9 and v5 uses 2.4.1.
@luksi what distro is that image based on, or is ruby compiled from source? If it’s a common distro, we could update the params.
I think the paths used in the ERB template are based on common distributions’ file locations, and if you need to change that path, then we need to modify https://github.com/voxpupuli/puppet-r10k/blob/master/templates/webhook.bin.erb to support an optional path string. Until then, you could possibly work around it by creating a symlink yo one of those directories.
The official Ruby Docker images are compiled from source.
Thanks for the tip. I simply rebuilt the image with the correct path locations. It's only a bit of a pain, as it would be nicer to simply be able to pull the Docker image and run r10k right out for the box with the paths correct.
I totally understand the focus on common distro locations. That seems natural. The use case, in this scenario, was breaking out the r10k functionality as a Docker container and it seemed a bit heavy-handed to use an OS distro, as opposed to a slimmed down Ruby image.
I'm actually going to go ahead and close this, as it's abundantly clear as I write this that this is clear edge case, even if the change would be slight. Thanks for the feedback!
I booted up a Docker image and ran the following code to get the r10k webhook running:
And I get the following stacktrace:
The simple solution appears to be to change this line in the webhook:
to this: