问题描述
我的个人网站有一个现有的git repo,我正在将它移植到Sinatra(主要用于模板,它是一个静态网站)。我不想丢失/重置此git存储库。
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.
当我尝试推送到Heroku时,出现下面的错误。我有一个config.ru文件,一个Gemfile和一个Gemfile.lock,以及其他一些Sinatra的东西。运行 rackup
工程,运行 bundle exec rackup
可以工作,并且我没有收到Heroku有关丢失依赖关系的任何警告。
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.
我错过了什么吗?
~/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'
推荐答案
问题解决了。我正在开发一个git分支,特别是Heroku / Sinatra支持,结果证明我正在运行 git push heroku master
,这会将本地主服务器推送到远程主服务器。主分支没有有效的Heroku应用程序。我认为它会将当前的本地分支推送到远程主分支,事实并非如此。 git push sinatra:master
解决了这个问题。
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.
这篇关于“Heroku推送被拒绝,没有检测到Cedar支持的应用程序”当试图用现有的git repo上传Sinatra应用程序时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!