"Heroku push rejected, no Cedar-supported app detected" when trying to upload a Sinatra app with an existing git repo

git, heroku, ruby, sinatra

Solution

Problem solved. I was working on a git branch especially for Heroku/Sinatra support, and it turns out I was running `git push heroku master`, which pushed local master to remote master. The master branch did not have a valid Heroku app. I assumed it would push the current local branch to the remote master branch, which is not the case. `git push sinatra:master` solved the issue.

Problem

I have an existing git repo for my personal website, which I am porting to Sinatra (mainly for templating, it's a static site). I do NOT want to lose/reset this git repository. When I try to push to Heroku, I get the error below. I have a config.ru file, a Gemfile, and a Gemfile.lock, along with some other stuff for Sinatra. Running `rackup` works, running `bundle exec rackup` works, and I didn't get any warnings from Heroku about missing dependencies. Am I missing something? I can post the directory structure of my site if it would help (though it's close sourced). ``` ~/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' ```

Original source

Related problems