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

Postdeploy error creating the Heroku app #6

Open
mllocs opened this issue Jul 10, 2020 · 0 comments
Open

Postdeploy error creating the Heroku app #6

mllocs opened this issue Jul 10, 2020 · 0 comments

Comments

@mllocs
Copy link

mllocs commented Jul 10, 2020

WHAT

When creating the app with the "Deploy to Heroku" button, the default configuration of the app.json file leads to a Postdeploy error:

ActiveRecord::ProtectedEnvironmentError: You are attempting to run a destructive action against your 'production' database.
If you are sure you want to continue, run the same command with the environment variable:
DISABLE_DATABASE_ENVIRONMENT_CHECK=1

The error comes from this postdeploy script (defined in the app.json file):

"scripts": {
  "postdeploy":"SEED=true rake db:schema:load db:migrate db:seed"
},

SOLUTIONS

We could remove that postdeploy script and update the README file suggesting to run that script manually. This way the user understands what's happening and can decide to use the DISABLE_DATABASE_ENVIRONMENT_CHECK=1 env var.

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

1 participant