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

Error running db:migrate:with_data after upgrading to Rails 7.2.0.rc1 #318

Closed
bruno-costanzo opened this issue Aug 9, 2024 · 8 comments
Closed

Comments

@bruno-costanzo
Copy link
Collaborator

After upgrading to Rails 7.2.0rc1 with PostgreSQL DB, the command db:migrate:with_data fails with the following backtrace.

rails db:migrate:with_data --trace
Running via Spring preloader in process 29250
** Invoke db:migrate:with_data (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:load_config
** Execute db:migrate:with_data
rake aborted!
NoMethodError: undefined method `with_connection' for an instance of ActiveRecord::ConnectionAdapters::PostgreSQLAdapter (NoMethodError)

      @pool.with_connection do |connection|
           ^^^^^^^^^^^^^^^^
Did you mean?  raw_connection
/home/bc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activerecord-7.2.0.rc1/lib/active_record/schema_migration.rb:53:in `create_table'
/home/bc/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/data_migrate-9.4.0/lib/data_migrate/data_migrator.rb:19:in `create_data_schema_table'
@Morozzzko
Copy link
Collaborator

For the reference: it should be fixed in #312

@elik-ru
Copy link

elik-ru commented Aug 19, 2024

PR was merged, could you please release new gem version?

@bruno-costanzo
Copy link
Collaborator Author

This is fixed after release 9.4.4

@padde
Copy link

padde commented Sep 3, 2024

Has the version 9.4.4 been yanked on purpose from Rubygems? This is currently blocking us from upgrading Rails to 7.2. I see that subsequent 10.x release versions have also been yanked, but some release candidates exist which we'd rather not experiment with until they are deemed stable 🙂 Thanks

@bruno-costanzo
Copy link
Collaborator Author

Yes, use the 11.0.3rc. It's going to be promoted soon.

@Morozzzko
Copy link
Collaborator

We've been running 11.0.0.rc3 for a few weeks now against 7.2 and it works well for us. So if there's a rush – the last RC is stable enough and will just be promoted with no extra commits.

@Morozzzko
Copy link
Collaborator

@padde 11.0.0 has been released, so feel free to upgrade!
https://rubygems.org/gems/data_migrate/versions/11.0.0

@padde
Copy link

padde commented Sep 21, 2024

@Morozzzko thanks for the update! Actually, we decided to get rid of data-migrate altogether instead 🙈 It wasn't fitting well with our use case anyway.

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

4 participants