我将rails代码推送到heroku时收到错误。
Counting objects: 20, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (19/19), done.
Writing objects: 100% (20/20), 1.75 KiB | 0 bytes/s, done.
Total 20 (delta 15), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! Could not complete the action. Please try again later.
remote:
To https://git.heroku.com/dishcuss-api.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/dishcuss-api.git'
我尝试了几种方法,包括回滚heroku和git pull,但它对我没用。
答案 0 :(得分:0)
我看到了两个可能的问题解决方案:
heroku run rake db:migrate
。答案 1 :(得分:0)
只需在heroku上运行迁移:
heroku run bundle exec rake db:migrate