I want add to an existing data base the postgis extension with rails as an environment. I have identified the rgeo gem associated with the activerecord-postgis-adapter gem
I did the classic bundle install
I have followed carefully the indications by adding to my database.yml
development:
adapter: postgis
schema_search_path: public
But when i launch :
rake db:gis:setup
i get this error :
NameError: uninitialized constant ActiveRecord::ConnectionAdapters::PostgreSQL::ColumnDefinition
[...]
ruby-2.6.3/gems/activerecord-postgis-adapter-3.1.2/lib/active_record/connection_adapters/postgis/spatial_table_definition.rb:46:in `<module:PostGIS>'
I have tried to install manually the postgis extension directly to my postgresql data base without success.
I have found this solution where the author of the gem tells us it is fixed in the latest commit but did not help so much.
My versions :
- ruby 2.6.3
- active-record 6.0.0
- postgresql 11.5
It looks like your version of
activerecord-postgis-adapteris 3.1.2, but the current version is 6.0.1. Could you try updating to the latest version and see if that works.