Reputation: 447
I'm in the process of pushing a webapp I designed in Rails to Heroku, but I'm having trouble when pushing the app to heroku. According to the console, when it starts preparing the app for the Rails asset pipeline, the rake aborts. At the end I get this error:
! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/connectr-demo.git'
I have heard that this is because of conflicts in the commits, but I have already pulled from github and everything is up to date, or at least the console is reporting so. At the recommendation of a similar question, I tried using "git fetch origin" and "git pull --rebase" but got the exact same results. I still get this error when I try to push to heroku. Can anyone tell me how I can fix this?
Upvotes: 0
Views: 41
Reputation: 11703
The (pre-receive hook declined)
means that Heroku didn't recognize the app. Make sure that the rails app is in the root directory of the repo not in a sub directory, make sure you have a Gemfile and make sure that it is named correctly.
Upvotes: 0
Reputation: 1920
Have you tried running heroku run rake db:migrate
and then try re-pushing to heroku git push heroku master
Upvotes: 0
Reputation: 3006
Is it a fast-forward merge, or do you need to force push?
Try git push -f heroku master
...
Upvotes: 0