Open
Description
This is an issue that was originally reported in #145 and I want to document it here for future users. PRs are welcome.
TLDR: if you're getting a similar error (see below), check to see if you're using a gem that is using custom schemas, such as the apartment gem. Heya does not currently support schemas.
Here's the error message that you may encounter if you're running into this issue:
$ rails heya:scheduler
rails aborted!
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "heya_steps" does not exist
LINE 1: ...M "public"."heya_campaign_memberships" INNER JOIN "heya_step...
^
Caused by:
PG::UndefinedTable: ERROR: relation "heya_steps" does not exist
LINE 1: ...M "public"."heya_campaign_memberships" INNER JOIN "heya_step...
^
Tasks: TOP => heya:scheduler
(See full trace by running task with --trace)
Here's one possible explanation:
It could be that I'm using the Apartment gem for multi-tenant schemas, I think the two are conflicting - the "public"."heya_campaign_memberships" table in the public schema, but the "heya_steps" table is being defined without a schema. I think this is it anyway.