Kameron White
Kameron White

Reputation: 139

How to setup or debug Heroku Ruby app after deployment

I just did a successful deployment to Heroku but my app will not work live. do I need to somehow migrate the database or something like that?

I'm using a postGreSQL database locally and everything is running fine, but besides doing the push and seeing that it deployed, I did nothing more in regards to setup or migrating the database on the Heroku server and I wonder if that's the problem or not?

Since I'm new to this I don't know all the required steps but I would think it should work as soon as I do a push but am I missing something?

My app appears to be awake and deployed correctly and it reacts to a page that should exist differently (->sorry, not working") to one that doesn't exist (->"this page doesn't exist"), leading me to believe that the pages are being read, but something about the way the deployment or the database is setup needs to be corrected.

Could somebody give me some obvious places to look, things to check, or otherwise point me in the right direction. is it a postGres issue? Not sure how to debug a Heroku app after it's already deployed? Thx!

Upvotes: 1

Views: 321

Answers (2)

Donovan
Donovan

Reputation: 15917

You need to run db:migrate on the heroku server...

heroku run rake db:migrate

Upvotes: 1

bjhaid
bjhaid

Reputation: 9762

What you need is heroku run whatever e.g:

heroku run rails c
Running `rails c` attached to terminal... up, run.3434
Loading production environment (Rails 4.0.0)
irb(main):001:0>

You can also do:

heroku logs -t

to tail your logs

heroku help
Usage: heroku COMMAND [--app APP] [command-specific-options]

Primary help topics, type "heroku help TOPIC" for more details:

  addons    #  manage addon resources
  apps      #  manage apps (create, destroy)
  auth      #  authentication (login, logout)
  config    #  manage app config vars
  domains   #  manage custom domains
  logs      #  display logs for an app
  ps        #  manage dynos (dynos, workers)
  releases  #  manage app releases
  run       #  run one-off commands (console, rake)
  sharing   #  manage collaborators on an app

Additional topics:

  account      #  manage heroku account options
  certs        #  manage ssl endpoints for an app
  db           #  manage the database for an app
  drains       #  display syslog drains for an app
  fork         #  clone an existing app
  git          #  manage git for apps
  help         #  list commands and display help
  keys         #  manage authentication keys
  labs         #  manage optional features
  maintenance  #  manage maintenance mode for an app
  pg           #  manage heroku-postgresql databases
  pgbackups    #  manage backups of heroku postgresql databases
  plugins      #  manage plugins to the heroku gem
  regions      #  list available regions
  stack        #  manage the stack for an app
  status       #  check status of heroku platform
  update       #  update the heroku client
  version      #  display version

Upvotes: 1

Related Questions