I’m trying to deploy a ruby (NOT rails) app to Heroku. My procfile is laid out like so:
console: bundle exec ruby main.rb
However, my app never actually launches. The logs on the system are all quiet, I see nothing resembling any error output.
If I run the command as shown in the procfile on my local system, my program launches and runs exactly as it should.
More interestingly, if I run heroku console, the app immediately fires up on the console itself. Looks like some interaction with the procfile? How do I launch my app automatically without being connected to the console on Heroku and have the stdout captured?
If you want the
consoleentry to run, you need to scale it:That said, Heroku uses
consoleto mean “the thing that I use to perform certain interactive administrative functions on my application”, which is whyheroku consoleruns theconsoleProcfile entry and provides you a bidirectional pipe. You seem to have a different meaning — “the thing which I need to always run to perform certain background tasks”. (webalso has special meaning to Heroku — the routing mesh will send HTTP requests towebprocesses.) I would therefore also rename this, so thatconsolestill means “console”.You could choose
main, for parity withmain.rb, but instead I would encourage you to think about what this component actually does and instead give both the Procfile entry andmain.rba descriptive label.