Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Fix Miscased Procfile in Heroku

Heroku will not reload my corrected Procfile

I have ran git status which shows me the Procfile and I realized that I spelled Procfile with a lower case p. I saw the error and updated the file name in my project but when I saved and ran git status again it stills shows it lower case. Of course now its not showing the site on Heroku.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   procfile
remote: -----> Discovering process types
remote:
remote:  ~     Mis-cased procfile detected; ignoring.
remote:  ~     Rename it to Procfile to have it honored.
remote:
remote:        Procfile declares types -> (none)

Total newbie on my first project. Should I delete the project on Heroku and just start all over fresh or can I just do a git init and then just push everything up again to Heroku?

like image 702
user3533000 Avatar asked Jul 21 '19 23:07

user3533000


People also ask

Is Procfile necessary Heroku?

A Procfile is not technically required to deploy simple apps written in most Heroku-supported languages—the platform automatically detects the language and creates a default web process type to boot the application server.

What is Procfile Heroku?

Procfile is a mechanism for declaring what commands are run by your application's dynos on the Heroku platform. From Process Types and the Procfile, which is a good introduction, but basically you use the Procfile to tell Heroku how to run various pieces of your app.

How do I run multiple commands in Procfile?

You can run multiple command inside Procfile using sh -c command : worker: sh -c 'firstCommand && secondCommand && etc...' Notes : Procfile should be at the project root level. A good answer will always include an explanation why this would solve the issue, so that the OP and any future readers can learn from it.


1 Answers

This worked for me,

  • remove the Procfile from your working project directory
  • in your command line

git add -A to add your changes to git, git commit -m "Removed Procfile", git push heroku master

  • then, create the new Procfile with the right capitalization in your working project directory
  • then add, commit, and push your code to Heroku. Done!
like image 126
Atm4God Avatar answered Nov 04 '22 03:11

Atm4God