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

db:prepare:with_data not working in rails 8.0.0 #352

Open
jandresrodriguez opened this issue Nov 25, 2024 · 0 comments · May be fixed by #353
Open

db:prepare:with_data not working in rails 8.0.0 #352

jandresrodriguez opened this issue Nov 25, 2024 · 0 comments · May be fixed by #353

Comments

@jandresrodriguez
Copy link

Hey there! 👋

I noticed that the db:prepare:with_data task isn’t working as expected with Rails 8 😞.

I’ve included the task trace below for reference.

Please let me know if you need any additional information or steps to help debug this!

Thanks in advance! 🙏

$ rails db:prepare:with_data --trace
** Invoke db:prepare:with_data (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:prepare:with_data
bin/rails aborted!
NoMethodError: undefined method `connection' for an instance of ActiveRecord::ConnectionAdapters::ConnectionPool (NoMethodError)

          unless database_exists?(pool.connection)
                                      ^^^^^^^^^^^
Did you mean?  connections
               connected?
/usr/local/bundle/gems/data_migrate-11.2.0/lib/data_migrate/database_tasks.rb:222:in `block (2 levels) in prepare_all_with_data'
/usr/local/bundle/gems/activerecord-8.0.0/lib/active_record/tasks/database_tasks.rb:546:in `with_temporary_pool'
/usr/local/bundle/gems/data_migrate-11.2.0/lib/data_migrate/database_tasks.rb:221:in `block in prepare_all_with_data'
/usr/local/bundle/gems/activerecord-8.0.0/lib/active_record/tasks/database_tasks.rb:587:in `block (2 levels) in each_current_configuration'
/usr/local/bundle/gems/activerecord-8.0.0/lib/active_record/tasks/database_tasks.rb:584:in `each'
/usr/local/bundle/gems/activerecord-8.0.0/lib/active_record/tasks/database_tasks.rb:584:in `block in each_current_configuration'
/usr/local/bundle/gems/activerecord-8.0.0/lib/active_record/tasks/database_tasks.rb:595:in `each'
/usr/local/bundle/gems/activerecord-8.0.0/lib/active_record/tasks/database_tasks.rb:595:in `each_current_environment'
/usr/local/bundle/gems/activerecord-8.0.0/lib/active_record/tasks/database_tasks.rb:583:in `each_current_configuration'
/usr/local/bundle/gems/data_migrate-11.2.0/lib/data_migrate/database_tasks.rb:218:in `prepare_all_with_data'
/usr/local/bundle/gems/data_migrate-11.2.0/tasks/databases.rake:153:in `block (3 levels) in <main>'
/usr/local/bundle/gems/rake-13.2.1/lib/rake/task.rb:281:in `block in execute'
/usr/local/bundle/gems/rake-13.2.1/lib/rake/task.rb:281:in `each'
/usr/local/bundle/gems/rake-13.2.1/lib/rake/task.rb:281:in `execute'
/usr/local/bundle/gems/rake-13.2.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/local/bundle/gems/rake-13.2.1/lib/rake/task.rb:199:in `synchronize'
/usr/local/bundle/gems/rake-13.2.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/local/bundle/gems/rake-13.2.1/lib/rake/task.rb:188:in `invoke'
/usr/local/bundle/gems/rake-13.2.1/lib/rake/application.rb:188:in `invoke_task'
/usr/local/bundle/gems/rake-13.2.1/lib/rake/application.rb:138:in `block (2 levels) in top_level'
/usr/local/bundle/gems/rake-13.2.1/lib/rake/application.rb:138:in `each'
/usr/local/bundle/gems/rake-13.2.1/lib/rake/application.rb:138:in `block in top_level'
/usr/local/bundle/gems/rake-13.2.1/lib/rake/application.rb:147:in `run_with_threads'
/usr/local/bundle/gems/rake-13.2.1/lib/rake/application.rb:132:in `top_level'
/usr/local/bundle/gems/railties-8.0.0/lib/rails/commands/rake/rake_command.rb:27:in `block (2 levels) in perform'
/usr/local/bundle/gems/rake-13.2.1/lib/rake/application.rb:214:in `standard_exception_handling'
/usr/local/bundle/gems/railties-8.0.0/lib/rails/commands/rake/rake_command.rb:27:in `block in perform'
/usr/local/bundle/gems/railties-8.0.0/lib/rails/commands/rake/rake_command.rb:44:in `block in with_rake'
/usr/local/bundle/gems/rake-13.2.1/lib/rake/rake_module.rb:59:in `with_application'
/usr/local/bundle/gems/railties-8.0.0/lib/rails/commands/rake/rake_command.rb:41:in `with_rake'
/usr/local/bundle/gems/railties-8.0.0/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/usr/local/bundle/gems/railties-8.0.0/lib/rails/command.rb:150:in `invoke_rake'
/usr/local/bundle/gems/railties-8.0.0/lib/rails/command.rb:67:in `block in invoke'
/usr/local/bundle/gems/railties-8.0.0/lib/rails/command.rb:143:in `with_argv'
/usr/local/bundle/gems/railties-8.0.0/lib/rails/command.rb:63:in `invoke'
/usr/local/bundle/gems/railties-8.0.0/lib/rails/commands.rb:18:in `<main>'
/usr/local/lib/ruby/3.3.0/bundled_gems.rb:69:in `require'
/usr/local/lib/ruby/3.3.0/bundled_gems.rb:69:in `block (2 levels) in replace_require'
/usr/local/bundle/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:prepare:with_data
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

Successfully merging a pull request may close this issue.

1 participant