Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 [email protected]:APP_NAME_HERE.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:APP_NAME_HERE.git'
like image 693
Nick McCurdy Avatar asked Dec 26 '22 19:12

Nick McCurdy


1 Answers

A Cedar app should recognise the config.ru file and create a web process for you, so it's possible that some essential file is not tracked by git. Check that config.ru, Gemfile and Gemfile.lock are all committed (you can use git status, but note that it will not output anything for ignored files so you should also check your .gitignore file).

If all the files are committed, you could also try specifying the command you want the web process to use in a Procfile. See the Heroku docs for more information:

  • Getting started with Ruby: Declare process types with Procfile
  • Declaring and Scaling Process Types with Procfile
like image 176
georgebrock Avatar answered Jan 05 '23 17:01

georgebrock