0

The app on Heroku was displaying the error "We're sorry, but something went wrong" up until I ran heroku run rake db:migrate, at which point the app didn't display any errors and worked fine besides not displaying any records from the database like it's supposed to.

I'm not sure whether the connection to the database on Heroku isn't working or whether the database on Heroku just has nothing in it, in which case I don't know why I can't push the contents on my local database to Heroku. heroku db:push didn't return any errors.

No errors from Rails or Heroku Toolbelt in the terminal, no errors on my local version, no errors on the version on Heroku, no indication of what isn't working.

Not sure what else to say.

This is what database.yml looks like:

default: &default
  adapter: postgresql
  encoding: unicode
  pool: 5

development:
  <<: *default
  database: app_development

test:
  <<: *default
  database: app_test

production:
  <<: *default
  database: # heroku database
  username: # heroku username
  password: # heroku password

Update: I inserted a record into the database on Heroku manually and it threw up the "We're sorry, but something went wrong error". So I guess the connection isn't working.

8
  • 3
    Have you tried heroku logs? Commented Oct 11, 2015 at 2:09
  • Not until now, no. Everything appears to be fine up until it says "Starting process with command 'bundle exec rake db:migrate' and then 'Process exited with status 0' Commented Oct 11, 2015 at 2:17
  • He who readeth the logs findeth the error. Commented Oct 11, 2015 at 2:18
  • Sorry, I keep forgetting that enter submits the post. I updated it with some kind of lead, the full message is far too long to post. Commented Oct 11, 2015 at 2:19
  • 1
    exit status 0 means success. Commented Oct 11, 2015 at 2:20

1 Answer 1

1

Push your local database to heroku using heroku pg:push. For example:

heroku pg:push mylocaldb HEROKU_POSTGRESQL_MAGENTA --app sushi

Check issues with your Heroku postgres database with heroku pg:diagnose

See the Heroku Postgres guide for more information

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.