Probably.
Say you have two files:
test.js
var process = require('child_process');
process.exec('ruby hello.rb',function (err,stdout,stderr) {
if (err) {
console.log("\n"+stderr);
} else {
console.log(stdout);
}
});
hello.rb
puts "Hello"
Run:
$ node test.js
=> Hello
Play around with that and you should be able to do what you are attempting.
Docs: https://nodejs.org/api/child_process.html
Ref: http://stackoverflow.com/questions/1880198/how-to-execute-shell-command-in-javascript