【问题标题】:Over-write app on Heroku with new app用新应用覆盖 Heroku 上的应用
【发布时间】:2012-01-12 18:43:50
【问题描述】:

我在 Heroku 上有一个应用程序,其应用程序名称我喜欢,但代码库我不打算使用。我为我不想要的项目重命名了应用程序。然后,我将正在开发的新应用程序推送到 Cedar,并使用我停止开发的原始应用程序名称明确声明了我想要的项目名称。现在,当我转到该应用程序名称时,即使我将新应用程序推到那里,我也只能看到旧应用程序。如何让我正在开发的新应用使用我喜欢的应用名称?

我假设我必须手动删除 Heroku 上的所有内容,然后再次执行“git push heroku master”,一切都会好起来的,但由于我对这一切还很陌生,所以我想知道正确的程序是。

谢谢。

Here is what I mean:
http://AppNameILike.heroku.com
#rename it to:
http://AppNameIlike-OLD.heroku.com
#create new heroku app with new project (notice recycling the name I like):
http://AppNameILike.heroku.com
#This new app still shows my old app

【问题讨论】:

  • 你是否将 git 远程更改为 heroku 以指向新名称/应用程序?
  • 不确定。我该怎么做呢?当我创建新应用程序时,我做了:“heroku create --stack cedar”然后是“git push heroku master”,然后是“heroku rename AppNameILike”
  • 如果您进入应用程序目录并使用以下命令:>git remote show heroku。你能看到 Fetch 和 Push URL 类似于 git@heroku.com:new_name.git 吗?
  • 是的,我可以。有我指定的名字。
  • 您确定子域 DNS 指向正确的应用程序吗?

标签: ruby-on-rails ruby-on-rails-3 git heroku cedar


【解决方案1】:

你用过heroku重命名命令吗?

http://devcenter.heroku.com/articles/renaming-apps

$ heroku rename newname
http://newname.heroku.com/ | git@heroku.com:newname.git
Git remote heroku updated

当您更改 heroku 应用程序的子域时,您会更改 git push url(即 heroku git remote)。因此,您还需要使用 heroku rename 命令来获得与 heroku 的正确 git“连接”。

【讨论】:

  • 是的,我确实使用了“heroku rename AppNameILike”,这就是我现在的位置。
  • 重命名过程是正确的,但有时远程 heroku repo 无法正确更新,因为它认为它是最新的,但实际上它不是。您必须在本地将其推送到不同的分支,然后您可以切换回 master(或您的默认仓库)。见:stackoverflow.com/questions/6104258/…
猜你喜欢
  • 2013-01-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-08-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多