Reputation: 1088
I have a web application that I am trying to push to Heroku that relies largely on calling an Octave script. For development/testing, I am using an EC2 instance and node.js. On the EC2 instance I have installed Octave.
However when I push to Heroku and try to call this octave script (via ajax call), I get this error: https://devcenter.heroku.com/articles/error-codes#h13-connection-closed-without-response
I read that Heroku runs on AWS instances, so I am assuming that it is possible to somehow call an Octave script, since I have done it on my own EC2 instance.
Scattered documentation makes me think that I will have to tell Heroku to install Octave when I push to Heroku, but I am not sure how to do this. Would it be in the node start script (and if so, how)? Or is it something else that I am missing?
EDIT: I am thinking it may instead have to be done through the Heroku buildpack -- can anybody confirm this?
EDIT 2: I think the answer is that I need an Octave buildpack, similar to: https://github.com/virtualstaticvoid/heroku-buildpack-r but for Octave instead of R. It looks like one does not exist so I will try my hand at making a custom buildpack.
Upvotes: 4
Views: 989
Reputation: 1088
Yes, you have to use a buildpack. I made one that allows you to run Octave scripts:
https://github.com/wclark3/heroku-buildpack-octave-dynare
It also includes Dynare, a macro-modeling package. So if you come across this answer and you only need Octave, just fork the repo and take out the lines that include Dynare from bin/compile.
Upvotes: 3