Topic: Building a plugin which interacts with an external program

I need to build a rails plugin which interacts with an application running on the server, but separate from rails. The application receives commands via the command line.

The idea is to build a plugin which issues these commands to the application, checks the response, re-issues the commands if the response was an error, and pass back the response information from the application.  Currently I am thinking of using the open3 library for this.

Is this library ok to use with rails? Is there a better one to use? (I am using an Ubuntu Linux server)

Also, I'm looking for a well written plugin that does a similar thing? I just want to see what is best practice and get a few ideas.