I “finished” a little python project and I want to deploy it on heroku
GitHub page.
I want to execute: python2 main.py -i json-rpc
in order to have the json-rpc server listening for connections
but I get the following error when pushing to heroku:
$ git push heroku master Counting objects: 153, done. Delta
compression using up to 8 threads. Compressing objects: 100% (87/87),
done. Writing objects: 100% (153/153), 43.42 KiB, done. Total 153
(delta 61), reused 153 (delta 61)—–> Heroku receiving push ! Heroku push rejected, no Cedar-supported app detected
To git@heroku.com:panager.git ! [remote rejected] master -> master
(pre-receive hook declined) error: failed to push some refs to
‘git@heroku.com:panager.git’
What you might want to try doing is creating a Procfile. The full filename is
Procfile, no extension, and it goes in the main directory of your project folder.The content of that file would be:
Give that a shot and see if it works.
Alternatively, you may have forgotten to create a
virtualenvfor your app.You should follow the instructions in Heroku’s guide Getting Started with Python on Heroku
Update:
Having finally tested this myself on a fresh Heroku app, what you’re missing is a
requirements.txt. Even though you don’t have any dependencies, you still need it. Within your virtualenv in the main project folder, runpip freeze > requirements.txt, and thengit add .thengit commit -m "added requirements.txt", and then push to Heroku and it should work.