"Heroku push rejected, cedar-enabled application not found" when trying to download a Sinatra application with an existing git repository

I have an existing git repository for my personal site, which I port to Sinatra (mainly for templates, this is a static site). I do NOT want to lose / reset this git repository.

When I try to click on Heroku, I get the error below. I have a config.ru file, Gemfile and Gemfile.lock, as well as some other materials for Sinatra. Running rackup works, bundle exec rackup , and I have not received any warnings from Heroku about missing dependencies.

Am I missing something? I can post the directory structure on my site if that helps (although it is close to the source).

 ~/Repos/website ➜ gp heroku master Counting objects: 2836, done. Compressing objects: 100% (2669/2669), done. Writing objects: 100% (2836/2836), 3.48 MiB | 252 KiB/s, done. Total 2836 (delta 481), reused 2117 (delta 155) -----> Heroku receiving push ! Heroku push rejected, no Cedar-supported app detected To git@heroku.com :APP_NAME_HERE.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to ' git@heroku.com :APP_NAME_HERE.git' 
+4
source share
3 answers

The problem is resolved. I worked on the git branch, especially to support Heroku / Sinatra, and it turned out that I was running git push heroku master , which dragged the local master to the remote master. The lead branch did not have a valid Heroku application. I assumed that this would push the current local branch to the remote master branch, which is not the case. git push sinatra:master solved the problem.

+4
source

The Cedar application should recognize the config.ru file and create a web process for you, so it is possible that some significant file is not tracked by git. Make sure all config.ru , Gemfile and Gemfile.lock fixed (you can use git status , but note that it does not output anything for ignored files, so you should also check your .gitignore file).

If all files are committed, you can also try specifying the command that the web process should use in Procfile . See Heroku docs for more information:

+4
source

For those who believe that the accepted answer does not solve their problem, this related question may provide a solution: "Heroku's failure was rejected, no application supporting Cedar was found." when trying to download Sinatra app with existing git repo

+2
source

All Articles