23
Tasks: TOP => assets:precompile
       (See full trace by running task with --trace)
 !
 !     Precompiling assets failed.
 !

 !     Push rejected, failed to compile Ruby app

To git@heroku.com:tranquil-crag-9767.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:tranquil-crag-9767.git'

Any ideas why this is happening? I have checked that everything is properly set up, and the connection to git is good.

eugen
  • 8,916
  • 11
  • 57
  • 65
user2918086
  • 265
  • 1
  • 2
  • 7
  • vlad schnakovszki i have already looked through that and there are different circumstances causing my error – user2918086 Feb 02 '14 at 21:39
  • Make sure in addition to your " git add . " you also do " git add -u " to remove old files. That fixed it for me. – JosephK Aug 17 '14 at 16:38
  • I was trying a standard git push without "heroku master". Seemed to work before but pushing explicitly to heroku master seemed to fix it for me. I also git RM'd some deleted files but that didn't seem to help me. – Erik Reppen Dec 18 '14 at 22:50
  • I had similar problem with django and heroku, I divided my settings file in base, local and production, so my mistake was to not set heroku config:set DJANGO_SETTINGS_MODULE. – neosergio Apr 11 '16 at 13:55

1 Answers1

11

First try to pull your master from heroku.

$ git pull heroku master

and then push it again. If you are still getting the same error then push your code with force

$ git push heroku master -f
Rahul Singh
  • 3,417
  • 2
  • 25
  • 32