Hello Everyone,
I’m facing an issue with a Rails project deployed on Fly.io. I’m trying to seed initial data into the project, but I’m encountering some challenges.
Steps I’ve Taken:
The following steps were taken to deploy to Fly.io.
- Deleted the app and DB from the Fly.io dashboard.
- Removed local Dockerfile and fly.toml.
- Ran the
fly launch
command. - Executed the
fly deploy
command. - Restarted the stopped apps:
❯ fly apps restart outdoor-heart-sutra-backend
Restarting machine 4d89446c254387
No health checks found
Machine 4d89446c254387 restarted successfully!
Restarting machine 5683d3d3a11778
No health checks found
Machine 5683d3d3a11778 restarted successfully!
- Attempted to seed initial data with db:seed:
❯ flyctl ssh console -a outdoor-heart-sutra-backend
Connecting to fdaa:1:d5f8:a7b:db52:9e04:167c:2... complete
root@4d89446c254387:/rails# bin/rails db:seed RAILS_ENV=production
- However, only half of the initial data was seeded.
- Tried db:reset, but encountered an error (as shown in the provided logs).
❯ flyctl ssh console -a outdoor-heart-sutra-backend
Connecting to fdaa:1:d5f8:a7b:ff:827f:1f30:2... complete
root@5683d3d3a11778:/rails# bin/rails db:reset RAILS_ENV=production
rails aborted!
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
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:69:in `check_protected_environments!'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/railties/databases.rake:18:in `block (2 levels) in <main>'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/rails/vendor/bundle/ruby/3.2.0/gems/sentry-ruby-5.10.0/lib/sentry/rake.rb:26:in `execute'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/rails/vendor/bundle/ruby/3.2.0/gems/railties-7.0.6/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/rails/vendor/bundle/ruby/3.2.0/gems/railties-7.0.6/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
/rails/vendor/bundle/ruby/3.2.0/gems/railties-7.0.6/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/rails/vendor/bundle/ruby/3.2.0/gems/railties-7.0.6/lib/rails/command.rb:51:in `invoke'
/rails/vendor/bundle/ruby/3.2.0/gems/railties-7.0.6/lib/rails/commands.rb:18:in `<main>'
/rails/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
Tasks: TOP => db:reset => db:drop => db:check_protected_environments
(See full trace by running task with --trace)
root@5683d3d3a11778:/rails#
- Attempted again using the
DISABLE_DATABASE_ENVIRONMENT_CHECK=1
flag:
❯ flyctl ssh console -a outdoor-heart-sutra-backend
Connecting to fdaa:1:d5f8:a7b:ff:827f:1f30:2... complete
root@5683d3d3a11778:/rails# DISABLE_DATABASE_ENVIRONMENT_CHECK=1 bin/rails db:reset RAILS_ENV=production
-
Upon checking the production environment, the initial data submission still did not proceed as expected.
-
I tried using db:drop to delete the data, but the data was not removed.
❯ flyctl ssh console -a outdoor-heart-sutra-backend
Connecting to fdaa:1:d5f8:a7b:db52:9e04:167c:2... complete
root@4d89446c254387:/rails# DISABLE_DATABASE_ENVIRONMENT_CHECK=1 bin/rails db:drop RAILS_ENV=production
PG::ObjectInUse: ERROR: database "outdoor_heart_sutra_backend" is being accessed by other users
DETAIL: There is 1 other session using the database.
Couldn't drop database 'outdoor_heart_sutra_backend'
rails aborted!
ActiveRecord::StatementInvalid: PG::ObjectInUse: ERROR: database "outdoor_heart_sutra_backend" is being accessed by other users
DETAIL: There is 1 other session using the database.
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `exec'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block (2 levels) in execute'
/rails/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/rails/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/dependencies/interlock.rb:41:in `permit_concurrent_loads'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `block in execute'
/rails/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/rails/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/rails/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/rails/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/abstract_adapter.rb:769:in `block in log'
/rails/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/abstract_adapter.rb:760:in `log'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:46:in `execute'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/postgresql/schema_statements.rb:54:in `drop_database'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/postgresql_database_tasks.rb:32:in `drop'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:224:in `drop'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:239:in `block in drop_current'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:557:in `block (2 levels) in each_current_configuration'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:554:in `each'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:554:in `block in each_current_configuration'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:553:in `each'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:553:in `each_current_configuration'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:239:in `drop_current'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/railties/databases.rake:68:in `block (2 levels) in <main>'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/rails/vendor/bundle/ruby/3.2.0/gems/sentry-ruby-5.10.0/lib/sentry/rake.rb:26:in `execute'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/railties/databases.rake:64:in `block (2 levels) in <main>'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/rails/vendor/bundle/ruby/3.2.0/gems/sentry-ruby-5.10.0/lib/sentry/rake.rb:26:in `execute'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/rails/vendor/bundle/ruby/3.2.0/gems/railties-7.0.6/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/rails/vendor/bundle/ruby/3.2.0/gems/railties-7.0.6/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
/rails/vendor/bundle/ruby/3.2.0/gems/railties-7.0.6/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/rails/vendor/bundle/ruby/3.2.0/gems/railties-7.0.6/lib/rails/command.rb:51:in `invoke'
/rails/vendor/bundle/ruby/3.2.0/gems/railties-7.0.6/lib/rails/commands.rb:18:in `<main>'
/rails/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
Caused by:
PG::ObjectInUse: ERROR: database "outdoor_heart_sutra_backend" is being accessed by other users
DETAIL: There is 1 other session using the database.
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `exec'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block (2 levels) in execute'
/rails/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/rails/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/dependencies/interlock.rb:41:in `permit_concurrent_loads'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `block in execute'
/rails/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/rails/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/rails/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/rails/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/abstract_adapter.rb:769:in `block in log'
/rails/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.6/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/abstract_adapter.rb:760:in `log'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:46:in `execute'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/connection_adapters/postgresql/schema_statements.rb:54:in `drop_database'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/postgresql_database_tasks.rb:32:in `drop'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:224:in `drop'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:239:in `block in drop_current'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:557:in `block (2 levels) in each_current_configuration'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:554:in `each'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:554:in `block in each_current_configuration'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:553:in `each'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:553:in `each_current_configuration'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/tasks/database_tasks.rb:239:in `drop_current'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/railties/databases.rake:68:in `block (2 levels) in <main>'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/rails/vendor/bundle/ruby/3.2.0/gems/sentry-ruby-5.10.0/lib/sentry/rake.rb:26:in `execute'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/rails/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.6/lib/active_record/railties/databases.rake:64:in `block (2 levels) in <main>'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/rails/vendor/bundle/ruby/3.2.0/gems/sentry-ruby-5.10.0/lib/sentry/rake.rb:26:in `execute'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/rails/vendor/bundle/ruby/3.2.0/gems/railties-7.0.6/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/rails/vendor/bundle/ruby/3.2.0/gems/railties-7.0.6/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
/rails/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
/rails/vendor/bundle/ruby/3.2.0/gems/railties-7.0.6/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/rails/vendor/bundle/ruby/3.2.0/gems/railties-7.0.6/lib/rails/command.rb:51:in `invoke'
/rails/vendor/bundle/ruby/3.2.0/gems/railties-7.0.6/lib/rails/commands.rb:18:in `<main>'
/rails/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
Tasks: TOP => db:drop:_unsafe
(See full trace by running task with --trace)
What I’d Like to Know:
- How can I successfully execute db:reset?
- I want to use Rails’ db:seed to seed the initial data present in the backend/db/seeds.rb file. How can I achieve this?
Development Environment:
- React: 18.2.0
- Next.js: 13.4.6
- Ruby: 3.2.1
- Rails API Mode: 7.0.4