Error env: ruby_executable_hooks: No such file or directory while running Slather on Jenkins

不想你离开。 提交于 2020-06-18 20:24:06

问题


I am trying to configure slather on my Jenkins server. Everything works fine when I run slather command using Terminal, but the script seems to fail when I run it on the Jenkins server. Each time I get env: ruby_executable_hooks: No such file or directory error when I run the script on the jenkins server.

Here is the script I am running through slather

slather coverage -x --output-directory /Users/Shared/Jenkins/Home/workspace/TestApp/test-reports/ --scheme TestApp /Users/Shared/Jenkins/Home/workspace/TestApp/TestApp.xcodeproj

Here is the PATH variable I am setting while executing this shell

$PATH:/Users/Shared/Jenkins/.gem/ruby/2.4.0/bin


回答1:


Finally fixed this issue by running the following shell command using Jenkins.

$Home/.rvm/gems/ruby-2.4.1/wrappers/slather

Earlier, I was reffering to

$Home/.rvm/gems/ruby-2.4.1/bin/slather

and the bin does not have ruby environment support when exectued via shell script.



来源:https://stackoverflow.com/questions/47163349/error-env-ruby-executable-hooks-no-such-file-or-directory-while-running-slathe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!