【问题标题】:Upgrading from Heroku Bamboo stack to a Cedar stack从 Heroku Bamboo 堆栈升级到 Cedar 堆栈
【发布时间】:2012-04-02 23:37:44
【问题描述】:

我正在将我的应用程序从 Rails 3.0 升级到 Rails 3.1。为此,我需要将我的 Heroku 堆栈升级到 Cedar 而不是目前正在运行的 Bamboo。

我正在通过following tutorial 并且卡在我部署git push heroku master 的部分。当我运行这个 git 时,假设我正在推送到我的 Bamboo 应用程序,而我真的想部署到我的新 Cedar 堆栈。

PhotoRambler tonybeninate$ heroku apps
  photoramblr
  young-river-1492

young-river-1492 是我的新 Cedar 应用程序,但我不知道如何部署到它。任何人都可以建议吗?谢谢。

或者我需要先删除我的 Bamboo 堆栈吗?

【问题讨论】:

标签: ruby-on-rails-3.1 heroku cedar


【解决方案1】:

不,您的 .git/config 仍然认为 heroku 是您的旧应用程序。如果您破解打开该文件并编辑heroku 遥控器,那么它将开始推送到正确的位置。

【讨论】:

    【解决方案2】:

    您是否尝试过检查您是如何为新应用添加 heroku 存储库的?即

     git remote remove heroku #to remove the link to photoramblr
    
     git remote add heroku git@heroku.com:young-river-1492.git # to add the new one
    

    然后

     git push heroku master
    

    您可能还想在新的一次启动后删除您的竹应用程序,否则您需要为 heroku 命令指定什么应用程序,即:

     #instead of 
     heroku rake db:migrate
     #you'll have to do
     heroku rake db:migrate --app young-river-1492
    

    【讨论】:

      【解决方案3】:

      查看migrating to the Cedar stack 上的本教程 - 特别是creating a new Cedar app and deploying 上的部分。你在正确的轨道上 - 你只需要指定 git 应该推送到哪个应用程序,因为你现在有不止一次可供选择。

      • 找出新应用程序调用的遥控器是什么

      >git remote

      • 推送到新遥控器

      >git push young-river-1492-heroku young-river-1492

      您也可以使用git remote rename 重命名您的遥控器。

      如果您愿意,您可以改为编辑您的配置文件,ala Neil's answer,或者在您使用长表单成功推送一次后编辑配置,以确保其正常工作。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-08-07
        • 2011-12-08
        • 2012-07-10
        • 2011-11-22
        • 1970-01-01
        • 2012-01-23
        • 2018-05-08
        • 1970-01-01
        相关资源
        最近更新 更多