I just deployed solid_cable (latest) to production and hit a few problems. The largest of which was this this from the README:
Then run db:prepare in production to ensure the database is created and the schema is loaded.
db:prepare will only execute if the database doesn't exist.
Problem
For those who use managed databases, the DB is pre-created and the path forward isn't clear.
So I had an empty solid_cable DB with no tables causing app failures.
Failed Solution
I tried bin/rails db:schema:load:cable which errored out with:
TypeError Invalid type for configuration. Expected Symbol, String, or Hash. Got nil
which I didn't investigate unfortunately.
Solution
Copying db/cable_schema.rb to a migration in db/cable_migrate resolved the issue for me.
I'm not sure if this was the best path to resolution but I wanted to point out the obstacle that likely others will hit.
BTW the same problem scenario exists for solid_cache.
I just deployed solid_cable (latest) to production and hit a few problems. The largest of which was this this from the README:
db:preparewill only execute if the database doesn't exist.Problem
For those who use managed databases, the DB is pre-created and the path forward isn't clear.
So I had an empty solid_cable DB with no tables causing app failures.
Failed Solution
I tried
bin/rails db:schema:load:cablewhich errored out with:which I didn't investigate unfortunately.
Solution
Copying
db/cable_schema.rbto a migration indb/cable_migrateresolved the issue for me.I'm not sure if this was the best path to resolution but I wanted to point out the obstacle that likely others will hit.
BTW the same problem scenario exists for solid_cache.