brown1001
brown1001

Reputation: 677

How do I let Heroku Know I have a requirements.txt file

I am trying to deploy a Django app on to Heroku but when I type git push heroku master, I get this output:

Counting objects: 1213, done.
Compressing objects: 100% (1184/1184), done.
Writing objects: 100% (1213/1213), 4.36 MiB | 504.00 KiB/s, done.
Total 1213 (delta 449), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: 
remote:  !     Push rejected, no Cedar-supported app detected
remote: 
remote: Verifying deploy...
remote: 
remote: !   Push rejected to article-django.
remote: 
To https://git.heroku.com/article-django.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/article-django.git'

I created a requirements.txt file, as advised in Heroku push rejected, no Cedar-supported app detected and I then typed in pip install -r requirements.txt before typing in git push heroku master again but I got the same output and so I need to know how to let Heroku know requirements.txt exists so I don't get this same error again.

Upvotes: 0

Views: 3546

Answers (2)

brown1001
brown1001

Reputation: 677

I typed in git commit -m 'another commit' and I got this output:

Your branch is up-to-date with 'django/master'.
Untracked files:
    procfile
    requirements.txt

I then typed in these commands:

git add procfile
git add requirements.txt

I typed in git commit -m 'another commit' and then git push heroku master, which worked.

Upvotes: 1

fasouto
fasouto

Reputation: 4511

I'm not really sure, but maybe you miss to add a [Procfile].(https://devcenter.heroku.com/articles/procfile) This file is neccesary to declare which server/process is going to run the dyno.

Upvotes: 0

Related Questions