I have an intermediate level with Ruby on Rails and have always deployed my web application through Heroku. I would like to develop a web application in Rails that would be able to interact with the following API https://musicbrainz.org/doc/libmusicbrainz. The libraries seem to be in C/C++. How do I bridge the gap between my Rails application in Ruby and a library which will provide me with C/C++ functions/files?
In the same spirit, if I develop a C++ application, compile the code and create the desired executable. How do I turn this program into a web application? Am I supposed to load the executable on Heroku and somehow call the program through Rails? Am I supposed to re-write the program in Ruby?
What is the general rule when we come to use libraries/programs which are not written in the same language than the core server-side language (Ruby in my case)?
I had a look at the following post How can I call C++ functions from within ruby but a more detailed answer with a clear path to on what steps I should follow would be helpful. Thank you.