【问题标题】:heroku rake migration issueheroku rake 迁移问题
【发布时间】:2012-06-05 06:55:03
【问题描述】:

我部署到heroku:git push heroku master

然后我尝试:heroku run rake db:migrate 但它显示了这个问题:

error: src refspec logs does not match any.
error: failed to push some refs to 'git@heroku.com:appname.git'

请帮我解决这个问题。

【问题讨论】:

    标签: ruby-on-rails heroku migration


    【解决方案1】:

    这是一个愚蠢的问题。我和你有同样的问题。我在 .bashrc 文件上添加别名。别名 heroku = 'git push heroku master'。这就是你运行 heroku 时总是显示这个问题的原因。删除此行。我相信它会解决你的问题。

    【讨论】:

      【解决方案2】:

      尝试使用git push -f git@heroku.com:appname.git 进行部署

      【讨论】:

        【解决方案3】:

        你可能只需要先提交:

        git commit -m "something"
        

        假设您添加了暂存文件。

        【讨论】:

        • 我提交并推送所有更改。然后:git push heroku master。完成。但我运行迁移。它显示了这个问题。
        • @khanh 你确定你已经提交了你的更改吗? git log 有什么显示吗?
        • git status # 在分支 master 上没有提交(工作目录干净)
        猜你喜欢
        • 2014-02-13
        • 2013-02-01
        • 1970-01-01
        • 2011-02-05
        • 2013-09-07
        • 2011-04-21
        • 2012-09-08
        • 2011-08-05
        相关资源
        最近更新 更多