There are several ways for running JavaScript inside of a Ruby script. For example, there is ExecJS which is frequently used for porting NPM modules to Ruby. So, is there a "ExecRuby" for Node?
Asked
Active
Viewed 8,008 times
1 Answers
18
You can invoke Ruby like any other shell command using child_process.exec()
var exec = require("child_process").exec;
exec('ruby -e "puts \'Hello from Ruby!\'"', function (err, stdout, stderr) {
console.log(stdout);
});
Don't know if that's what you're looking for?

Flambino
- 18,507
- 2
- 39
- 58
-
3That's true, of course. But I'm looking for a NPM module or something similar, which handles the bridge. Just like ExecJS does in Ruby. If there aren't library for this I guess it wouldn't be too hard to port ExecJS to Node and turn it around. – user544941 Nov 12 '11 at 09:57