I've been trying to push a django web app to heroku with no avail because of the following error:
(venv)douglaswong@Douglas-MacBook-Pro ~/testing (testing)$ git push heroku master
Counting objects: 53, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (35/35), done.
Writing objects: 100% (53/53), 41.11 KiB | 0 bytes/s, done.
Total 53 (delta 12), reused 48 (delta 11)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Fetching set buildpack git://github.com/heroku/heroku-buildpack-python.git... done
remote:
remote: ! Push rejected, failed to detect set buildpack git://github.com/heroku/heroku-buildpack-python.git
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to sleepy-spire-9508.
remote:
To https://git.heroku.com/sleepy-spire-9508.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/sleepy-spire-9508.git'
It says it failed to detect set buildpack. However, I had set it with
(venv)douglaswong@Douglas-MacBook-Pro ~/testing (testing)$ heroku create --buildpack git://github.com/heroku/heroku-buildpack-python.git
Creating fierce-waters-9228... done, stack is cedar-14
Buildpack set. Next release on fierce-waters-9228 will use git://github.com/heroku/heroku-buildpack-python.git.
https://fierce-waters-9228.herokuapp.com/ | https://git.heroku.com/fierce-waters-9228.git
What are some possible causes for this? I currently have these files in my root directory if it makes a difference:
Procfile angellistJob venv
README.md requirements.txt
Any advice is appreciated, thank you!
I had a similar issue. For me the problem was that I forgot to commit the changes to my local repo.
Also, make sure you commit to the same branch you're pushing to.
Hope this helps!
Just to bring to the notice of anyone who has the same problem.
Even I had the same problem and was committing to the exact branch I was pushing to. However, since I didn't have the requirements.txt file, the push was being rejected.
So, also make sure you have the Procfile and the requirements.txt before pushing to heroku.
I found out that this issue might occur for two reasons:
requirements.txt
file in the current directory.On the other hand you could set the respective buildpacks at the moment of create the app.
heroku create myapp --buildpack heroku/python
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With