Since we don't know anything about your plugin, there is no way we can tell you how to integrate the two.
If the plugin was properly implemented to be integrated into another application, I guess you could instantiate some CLI
class, or even instantiate a service class, and call the proper API.
The only coding I can suggest, given your input (and assuming the ruby app at least knows where the plugin is) - the ruby app can simply call the plugin CLI from a shell using Backticks:
if args == ['-c']
`../plugin_app -c`
end