taiseifukushi / kbus_timetable

kbus_timetable
https://kbus-timetable-husita-h.onrender.com
1 stars 0 forks source link

[bug]データが重複して作られる #61

Closed taiseifukushi closed 2 years ago

taiseifukushi commented 2 years ago

heroku run rails db:drop DISABLE_DATABASE_ENVIRONMENT_CHECK=1 はできない

↓ heroku pg:reset -a k-bus-norikae-app

taiseifukushi commented 2 years ago

失敗 heroku run rails db:create -a k-bus-norikae-app DISABLE_DATABASE_ENVIRONMENT_CHECK=1 RAILS_ENV=production

Database 'd8rnfaaqaj9ddf' does not exist
We could not find your database: postgres. Which can be found in the database configuration file located at config/database.yml.

To resolve this issue:

- Did you create the database for this app, or delete it? You may need to create your database.
- Has the database name changed? Check your database.yml config has the correct database name.

To create your database, run:

        bin/rails db:create
Couldn't create 'd8rnfaaqaj9ddf' database. Please check your configuration.
rails aborted!
I, [2022-08-16T11:52:40.934683 #4]  INFO -- sentry: [Transport] Sending envelope with items [event] 6b3b018bfdae4a49b5a5e161c415d1ab to Sentry
ActiveRecord::NoDatabaseError: We could not find your database: postgres. Which can be found in the database configuration file located at config/database.yml.

To resolve this issue:

- Did you create the database for this app, or delete it? You may need to create your database.
- Has the database name changed? Check your database.yml config has the correct database name.

To create your database, run:

        bin/rails db:create

Caused by:
PG::ConnectionBad: FATAL:  permission denied for database "postgres"
DETAIL:  User does not have CONNECT privilege.

Tasks: TOP => db:create
(See full trace by running task with --trace)

成功 heroku run DISABLE_DATABASE_ENVIRONMENT_CHECK=1 rails db:migrate -a k-bus-norikae-app RAILS_ENV=production