I'm creating a map with Google Maps API to reference restaurants based on their location. Each restaurant in my database (sqlite3) has a title, a description and two coordinates (latitude, longitude). I can successfully create entries in my database but struggle to find a solution to call in JS each restaurant's coordinates from the database. 

Different solutions have been proposed on Stackoverflow of which [this one](https://stackoverflow.com/questions/43104209/cluster-markers-with-google-maps-api-locations-from-database), [another](https://stackoverflow.com/questions/11503254/accessing-mysql-database-to-add-markers-on-google-maps-api-v3-using-javascript) and a [last one](https://stackoverflow.com/questions/13677741/how-to-add-locationsmarkers-on-a-google-map-from-database), but none of the answers my question as I'm working exclusively with JS and Ruby (on rails). 

Would you have suggestions ?