0

Whenever i try to run heroku run rake db:migrate or want to bundle install

i get the following error message:

    PG:DuplicateObject: ERROR: constraint "fk_rails_d0c2931" 
    for relation "subscription" already exist
    : ALTER TABLE "subscriptions" ADD CONTRAINT
    "fk_railsd0c2931" FOREIGN KEY ("project_id")

Edit:

Prometheus
  • 799
  • 8
  • 28
  • Are you migrating into a fresh db? The error indicates you are trying to create a foreign key where one already exists. – Eyeslandic Feb 03 '17 at 10:24
  • Mhm, no, actually i just wanted to deploy my application to heroku and run heroku run rake db:migrate in order to be able to use devise and so on. Its weird – Prometheus Feb 03 '17 at 10:40
  • Does it work locally? – Eyeslandic Feb 03 '17 at 10:47
  • You mean rake db:migrate? Yes, if i run rake db:migrate locally it just returns, since i have no open migration. – Prometheus Feb 03 '17 at 11:04
  • You can run `rake db:schema:load` on heroku then – Eyeslandic Feb 03 '17 at 12:02
  • Okay, i ran heroku rake db:schema:load and it worked. However, when i click on sign up or sign in on my application i get the error: We're sorry, but something went wrong. If you are the application owner check the logs for more information. This Error is normally gone when i run heroku run rake db:migrate. I've tried to run rake db:migrate again and it worked, however, i get still the same Error that something went wrong. Where can i see the logs? The Heroku Logs don't show anything on that problem. I see only the commit logs. – Prometheus Feb 03 '17 at 12:10
  • You'll have to take a look at the logs then to see what's going on. – Eyeslandic Feb 03 '17 at 12:11
  • And where do i find the logs? On heroku itself i only see my commits logs. I don't see any log particular to this problem. – Prometheus Feb 03 '17 at 12:15
  • https://devcenter.heroku.com/articles/logging – Eyeslandic Feb 03 '17 at 12:19
  • I posted the heroku log file as a new answer. Thanks already for helping out so much! – Prometheus Feb 03 '17 at 12:32
  • Are you trying to sign in with Google Authorisation? The log shows `ActionView::Template::Error (undefi ned method 'user_omniauth_authorize_path' for #<#:0x007f f36d84e7d0>):` – Simon Cooper Jun 12 '17 at 17:29

0 Answers0