Reputation: 687
Server/Client are the same box. Creating a UI to run ruby test scripts locally.
I want something like executing an ActiveXObject:
w = new ActiveXObject("WScript.Shell");
w.run('test.rb');
File structure is as follows
>Project
-index.HTML
-custom.js
>Scripts
-Ruby Script
Upvotes: 3
Views: 3589
Reputation: 31097
Assuming ruby is installed in the system and is included in the PATH variable. All you need to do is:
var w = new ActiveXObject("WScript.Shell");
w.run('ruby Scripts\\test.rb');
Upvotes: 3