错误环境:ruby_executable_hooks:在Jenkins上运行Slather时没有这样的文件或目录 [英] Error env: ruby_executable_hooks: No such file or directory while running Slather on Jenkins
问题描述
我正在尝试在我的Jenkins服务器上配置slather.当我使用Terminal运行slather命令时,一切正常,但是当我在Jenkins服务器上运行脚本时,脚本似乎失败.每当我收到env时:ruby_executable_hooks:当我在jenkins服务器上运行脚本时,没有这样的文件或目录错误.
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.
这是我通过slather运行的脚本
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
这是我在执行此shell时设置的PATH变量
Here is the PATH variable I am setting while executing this shell
$ PATH:/Users/Shared/Jenkins/.gem/ruby/2.4.0/bin
$PATH:/Users/Shared/Jenkins/.gem/ruby/2.4.0/bin
推荐答案
最后通过使用Jenkins运行以下shell命令来解决此问题.
Finally fixed this issue by running the following shell command using Jenkins.
$ Home/.rvm/gems/ruby-2.4.1/wrappers/slather
$Home/.rvm/gems/ruby-2.4.1/wrappers/slather
之前,我是
$ Home/.rvm/gems/ruby-2.4.1/bin/slather
$Home/.rvm/gems/ruby-2.4.1/bin/slather
并且通过shell脚本执行时,垃圾箱不支持ruby环境.
and the bin does not have ruby environment support when exectued via shell script.
这篇关于错误环境:ruby_executable_hooks:在Jenkins上运行Slather时没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!