I am sure, you have probably figured it out by now, but since this question helped me, I can go off of Sean's answer and complete the puzzle.
module.exports = (robot) ->
robot.respond /your regex/i, (msg) ->
cp = require "child_process"
cp.exec "./path/from/root/to/ruby script", (error, stdout, stderr) ->
if error
msg.send "Sorry I encounted this error \n" + stderr
else
msg.send "Done. The output: \n" + stdout
I hope this helps.