Heroku: run Rails application using Python script on the same instance

I have a Python script in the directory of /app/bin

my Rails application that contains a file requirements.txt

that includes all the dependencies it relies on.

How do I get it to run on the same Heroku instance that the Rails app is currently running on (the Rails app sometimes calls a python script).

Here's what I've tried so far:

  • Place the file requirements.txt

    in a directory /

    . Failed to install any python dependencies.
  • It is chased heroku run bash

    and then executed pip install -r requirements.txt

    . Received a message pip command not found

    .
  • Tried installing pip via bash interface using sudo python get-pip.py

    after curl

    with script as suggested on pipe install site . Doesn't work - unsurprisingly they don't support commands sudo

    in the instance.

I know Heroku should support pip

out of the box, but it doesn't do anything with the file requirements.txt

once the app is detected Ruby

.

+3


source to share


1 answer


You can use Heroku Buildpack Multi to run both python and ruby ​​app on the same instance using their respective buildpacks.



+3


source







All Articles