Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation: db:prepare with pre-created databases #45

Open
pglombardo opened this issue Oct 13, 2024 · 1 comment
Open

Installation: db:prepare with pre-created databases #45

pglombardo opened this issue Oct 13, 2024 · 1 comment

Comments

@pglombardo
Copy link

pglombardo commented Oct 13, 2024

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.

@bellenss
Copy link

confirming I bumped into the same issue - the solution / workaround helped me. Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants