Closed WattsInABox closed 8 years ago
:+1:
at the very least, an attribute should be exposed to set the shebang line.
Indeed, currently this doesn't work when using chefdk :(
I found another case where it broke - I installed ruby from source on an ARM device and it was installed to /usr/local/bin/ruby. I don't want to change it now as it is in my base image which takes hours to build. Also as there is no Chef omnibus installer for ARM devices I installed chef as a Gem. Thus I have no embedded ruby.
The result is now that I want to configure some port forwarding on a number of devices with this cookbook, it doesn't work because ruby is in neither of the 2 places it looks. It is registered to work correctly with /usr/bin/env ruby
though.
An attribute or the last solution from @billywatson suggested in the closed pull request #19 would work I think
I couldn't get the /usr/bin/env solution to work on my system but have just opened a pull request which adds an attribute for the system ruby path, #60
This has been resolved with PR #60. Thanks @pghalliday for the contribution!
There's a semi-complicated bit of code to apply a different shebang line depending on where ruby is located in the system. IMO, it should just use