-
-
Notifications
You must be signed in to change notification settings - Fork 250
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
Support for Rails 8.0.0 #411
Comments
Hi @navidemad I don't think we'll do such a thing, as we are still trying to find time to handle 7.2 (non-beta) support. If you want to be the champion of it, or if you find a way to sponsor the gem (https://opencollective.com/rgeo), then this may happen :) We'll for sure take care of it when it goes out of beta (I'm also paid maintainer of the activerecord-cockroachdb-adapter, hence I usually first upgrade there, and then here) |
I've been looking around and trying to help but I am a bit confused because of the current state of master(or main) branch. |
@formigarafa currently we have only partial support of the beta, and I have a PR ongoing for full support, but tests are failing (#405). So the current goal is merging #405, which I'm considering to merge with some tests ignored and opening related issues. If that is the case would you be able to help on fixing tests (and thus maybe some parts of the codebase as well...). About |
That clarify heaps, thanks. I was wondering if jRuby compatibility was a blocker. If that isn't the case, I agree with @BuonOmo, just focus on what is supported in first place should be the best for everyone. Even better with a single PR to look at. Thanks. |
Rails 8.0.0 has been released a few days ago. Maybe update the title to "Support for Rails 8.0.0" and reconsider the "won't fix" tag? |
@matthee fair enough. This doesn't mean that we magically have time to push it forward now! I suspect @keithdoggett is quite busy these days, and I have to earn some money myself as well. As I said in the related PR:
|
Thank you for updating the issue! I know and appreciate that supporting this gem is a lot of work for you maintainers. I just wanted to keep this issue moving forward. 😉 |
Hi all, First, a big thank you for this amazing gem. Sorry if I am off-topic but I'd like to ask extra advice. My Rails app is using Rails 8, and while I’m aware the adapter doesn’t officially support it yet, I’ve been exploring ways to keep things running smoothly - in the meantime the gem doesn't support Rails 8. Out of necessity, I’ve been working without the adapter, but I’ve hit a few challenges that I’d love advice on. Specifically, I’ve encountered issues with the internal tables PostGIS uses for geospatial calculations when recreating the database. Running the usual setup commands: rails db:drop db:create db:schema:load db:migrate leads to this error:
To work around this, I added the following initializer to ignore ActiveRecord::SchemaDumper.ignore_tables |= ["spatial_ref_sys"] However, this workaround introduced another issue during testing. Without properly handling
To address this, I added a config.before(:suite) do
postgis_table_count = ActiveRecord::Base.connection.execute(
"SELECT COUNT(*) FROM spatial_ref_sys WHERE srid = 4326;"
).values.flatten.first.to_i
if postgis_table_count.zero?
# Force the extension to re-create everything needed
ActiveRecord::Base.connection.execute("DROP EXTENSION IF EXISTS postgis CASCADE;")
ActiveRecord::Base.connection.execute("CREATE EXTENSION IF NOT EXISTS postgis;")
end
end This makes sure the table is in place, but it feels more like a patch (a.k.a "workaround") than a robust solution. Given this context, I’d love to ask:
|
The postgis adapter does not support Rails 8 at the moment: rgeo/activerecord-postgis-adapter#411 (comment) I’ve encountered issues with the internal tables PostGIS uses for geospatial calculations when recreating the database. Running the usual setup commands: rails db:drop db:create db:schema:load db:migrate leads to this error: PG::DependentObjectsStillExist: ERROR: cannot drop table spatial_ref_sys because extension postgis requires it To work around this, I added the following initializer to ignore spatial_ref_sys during schema dumps: ActiveRecord::SchemaDumper.ignore_tables |= ["spatial_ref_sys"]
The postgis adapter does not support Rails 8 at the moment: rgeo/activerecord-postgis-adapter#411 (comment) I’ve encountered issues with the internal tables PostGIS uses for geospatial calculations when recreating the database. Running the usual setup commands: rails db:drop db:create db:schema:load db:migrate leads to this error: PG::DependentObjectsStillExist: ERROR: cannot drop table spatial_ref_sys because extension postgis requires it To work around this, I added the following initializer to ignore spatial_ref_sys during schema dumps: ActiveRecord::SchemaDumper.ignore_tables |= ["spatial_ref_sys"]
The postgis adapter does not support Rails 8 at the moment: rgeo/activerecord-postgis-adapter#411 (comment) I’ve encountered issues with the internal tables PostGIS uses for geospatial calculations when recreating the database. Running the usual setup commands: rails db:drop db:create db:schema:load db:migrate leads to this error: PG::DependentObjectsStillExist: ERROR: cannot drop table spatial_ref_sys because extension postgis requires it To work around this, I added the following initializer to ignore spatial_ref_sys during schema dumps: ActiveRecord::SchemaDumper.ignore_tables |= ["spatial_ref_sys"]
Thanks for the awesome gem.
I recently migrated my app to Rails 8.0.0.beta1, and wanted to try this adapter but there is a lock becase activerecord-postgis-adapter >= 9.0.0 depends on activerecord ~> 7.1.0.
Looking forward to test it :)
The text was updated successfully, but these errors were encountered: