小编ehm*_*key的帖子

从 powershell 调用 ruby​​ 脚本

我有以下情况:带有以下变量的 powershell 脚本:

$RUBY = "C:\installing\ruby\bin\ruby.exe"
$ARGS = "C:\files\sript.rb $Arg1 $Arg2 $Arg3"
Run Code Online (Sandbox Code Playgroud)

在批处理文件中我可以写

%RUBY% %ARGS% 
Run Code Online (Sandbox Code Playgroud)

它有效。

但我怎样才能在 powershell 中做到这一点?

重要的是 ruby​​ 安装路径是可变的。

我尝试使用 Start-Process 但只启动了 ruby​​.exe,没有脚本。

有什么提示吗?

谢谢。

ruby powershell

5
推荐指数
1
解决办法
7301
查看次数

标签 统计

powershell ×1

ruby ×1