While using rubygemrecipe recipe on buildout with SlapOS, I faced and issue which say:
'bad interpreter: Permission denied' caused by the case where self.ruby_executable is too long and it hit the shebang line length limitation which result to an incomplete path of ruby executable. I didn't see any good solution to reduce the path of ruby in an automated way in our system, so I tried this patch which fixed the problem.
+++ rubygems.py 2017-05-03 14:05:27.501683637 +0200 @@ -200,6 +200,7 @@ def _install_gem(self, gemname, gem_executable, bindir): cmd = [ + self.ruby_executable, gem_executable, 'install', '--no-rdoc',
it allow to call the script as 'self.ruby_executable gem_executable' instead of only 'gem_executable' and avoid to hit shebang length limitation.
Can you please review and apply this change ?