I tried running:
$ git push heroku master
-----
Total 7121 (delta 2300), reused 6879 (delta 2228)
! Heroku push rejected, no Cedar-supported app de
I struggled with this issue for a long time and the only solution was Vincent van Leeuwen's, but I didn't understand why. The problem turned out to be that I was working from a local branch other than master. So when I was running
git push heroku master
I was actually pushing
(local) master->(heroku) master
and not
(local) current_branch -> (heroku) master
as I intended. This failed because my local master branch didn't have requirements.txt, Procfile, etc.
The solution is:
git push heroku current_branch:master
See heroku docs for more.
Hope this helps.
My situation is that my codes are needed to save both on Github and Heroku, if I use the following solution, rm -rf .git
will delete the connection to my Github, therefore I can't push my codes to Github.
rm -rf .git
git init
git add .
git commit -m "First commit"
heroku create --stack cedar-14
git push heroku master
Instead, my solution is as follows:
$ heroku create
$ heroku config:add BUILDPACK_URL=git://github.com/heroku/heroku-buildpack-python.git
$ git push heroku master
All the above solutions dont mention that what matters is where is your .git initialised. Actually when you try push on heroku you should be doing it from the directory where you had initialsed the git itself. Also the directory you are uploading should be the one where you have files like
requirements.txt, Procfile, virtualenv, manage.py and .gitignore
etc. In short Heroku needs all files to understand the type of project you want to upload so these files should be accessible on the root directory.
My stupid error was to mispell requirements.txt
as the erroneous requirments.txt
. I didn't need setup.py
.
Additionally I need to actually store the git repository in Github. Just creating it locally wasn't enough.
You need to add the requirement.txt file to git and then push it will work of sure.
Since Django is a python app, you'll need to have requirements.txt
and setup.py
sit in the root of your repo and not the src sub-directory. See https://github.com/heroku/heroku-buildpack-python/blob/master/bin/detect