我有红宝石文件sample.rb
文件内容是
puts "Hello Ruby"
当我在Windows cmd上执行此命令时,它可以正常工作,但是当我尝试通过Jenkins执行该命令时,它将无法正常工作。如何使用Jenkins运行此文件?
我正在使用的红宝石版本
ruby -v
ruby 2.5.3p105 (2018-10-18 revision 65156) [x64-mingw32]
更新
试图在jenkins中运行ruby -v,这给了我以下错误
[HelloRuby] $ cmd /c call C:\WINDOWS\TEMP\jenkins8144880231444275150.bat
D:\Jenkins\workspace\HelloRuby>ruby -v
'ruby' is not recognized as an internal or external command,
operable program or batch file.
D:\Jenkins\workspace\HelloRuby>exit 9009
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE