Skip to content
This repository has been archived by the owner on Oct 16, 2018. It is now read-only.

Debugging

Eliot Sykes edited this page Mar 13, 2017 · 4 revisions

General Debugging

If you encounter unexpected or seemingly buggy behaviour when working with Payola, please check the following:

  • Stripe dashboard setup to send events to your app's Stripe webhooks URL ending /payola/events
  • The webhooks URL is visible on the public internet
  • Made changes to config/initializers/payola.rb or the environment variables? Always do the following to ensure the latest changes are picked up:
    • Stop Spring application preloader with bin/spring stop
    • Restart server

Migration Issues

PG::UndefinedTable - ERROR: relation "payola_subscriptions" does not exist

Depending on how migrations are run, it can result in the Payola migrations not being run and errors like the above that complain about tables not existing.

If you run into an error with Payola migrations not being run, try the following:

# Run the db:migrate task as a separate command for each environment.

# Development Environment
# -----------------------
# Warning! You will lose your existing data:
bin/rake db:drop db:create; bin/rake db:migrate

# Test Environment
# ----------------
# Warning! You will lose your existing data:
RAILS_ENV=test bin/rake db:drop db:create; bin/rake db:migrate RAILS_ENV=test