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

uninitialized constant ActiveRecord::ConnectionAdapters::PostgreSQL::ColumnDefinition (NameError) #410

Open
asmrtfm opened this issue Sep 18, 2024 · 1 comment

Comments

@asmrtfm
Copy link

asmrtfm commented Sep 18, 2024

activerecord-postgis-adapter (9.0.2)
ruby versions tried: 3.2.4, 3.3.3
postgresql versions tried: 14, 16

I have followed all steps in the README, but whenever I get to the migration generator I always get the same error:

rails generate migration AddPostgisExtensionToDatabase

/home/me/.bundle/ruby/3.2.0/gems/activerecord-postgis-adapter-3.1.2/lib/active_record/connection_adapters/postgis/spatial_table_definition.rb:46:in `<module:PostGIS>': uninitialized constant ActiveRecord::ConnectionAdapters::PostgreSQL::ColumnDefinition (NameError)

      class ColumnDefinition < PostgreSQL::ColumnDefinition
                                         ^^^^^^^^^^^^^^^^^^
Did you mean?  ActiveRecord::ConnectionAdapters::AddColumnDefinition
	from /home/me/.bundle/ruby/3.2.0/gems/activerecord-postgis-adapter-3.1.2/lib/active_record/connection_adapters/postgis/spatial_table_definition.rb:3:in `<module:ConnectionAdapters>'
	from /home/me/.bundle/ruby/3.2.0/gems/activerecord-postgis-adapter-3.1.2/lib/active_record/connection_adapters/postgis/spatial_table_definition.rb:2:in `<module:ActiveRecord>'
	from /home/me/.bundle/ruby/3.2.0/gems/activerecord-postgis-adapter-3.1.2/lib/active_record/connection_adapters/postgis/spatial_table_definition.rb:1:in `<main>'
	from <internal:/home/me/.asdf/installs/ruby/3.2.4/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from <internal:/home/me/.asdf/installs/ruby/3.2.4/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from /home/me/.bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from /home/me/.bundle/ruby/3.2.0/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:34:in `require'
	from /home/me/.bundle/ruby/3.2.0/gems/activerecord-postgis-adapter-3.1.2/lib/active_record/connection_adapters/postgis_adapter.rb:12:in `<main>'
	from <internal:/home/me/.asdf/installs/ruby/3.2.4/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from <internal:/home/me/.asdf/installs/ruby/3.2.4/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from /home/me/.bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from /home/me/.bundle/ruby/3.2.0/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:34:in `require'
	from /home/me/.bundle/ruby/3.2.0/gems/activerecord-postgis-adapter-3.1.2/lib/activerecord-postgis-adapter.rb:1:in `<main>'
	from /home/me/.bundle/ruby/3.2.0/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:34:in `require'
	from /home/me/.bundle/ruby/3.2.0/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:34:in `require'
	from /home/me/.asdf/installs/ruby/3.2.4/lib/ruby/3.2.0/bundler/runtime.rb:60:in `block (2 levels) in require'
	from /home/me/.asdf/installs/ruby/3.2.4/lib/ruby/3.2.0/bundler/runtime.rb:55:in `each'
	from /home/me/.asdf/installs/ruby/3.2.4/lib/ruby/3.2.0/bundler/runtime.rb:55:in `block in require'
	from /home/me/.asdf/installs/ruby/3.2.4/lib/ruby/3.2.0/bundler/runtime.rb:44:in `each'
	from /home/me/.asdf/installs/ruby/3.2.4/lib/ruby/3.2.0/bundler/runtime.rb:44:in `require'
	from /home/me/.asdf/installs/ruby/3.2.4/lib/ruby/3.2.0/bundler.rb:187:in `require'
	from /home/me/.src/github/asmrtfm/neptune_spear/moonlite/config/application.rb:7:in `<main>'
	from <internal:/home/me/.asdf/installs/ruby/3.2.4/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from <internal:/home/me/.asdf/installs/ruby/3.2.4/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from /home/me/.bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from /home/me/.bundle/ruby/3.2.0/gems/railties-7.2.1/lib/rails/command/actions.rb:15:in `require_application!'
	from /home/me/.bundle/ruby/3.2.0/gems/railties-7.2.1/lib/rails/command/actions.rb:19:in `boot_application!'
	from /home/me/.bundle/ruby/3.2.0/gems/railties-7.2.1/lib/rails/commands/generate/generate_command.rb:21:in `perform'
	from /home/me/.bundle/ruby/3.2.0/gems/thor-1.3.2/lib/thor/command.rb:28:in `run'
	from /home/me/.bundle/ruby/3.2.0/gems/thor-1.3.2/lib/thor/invocation.rb:127:in `invoke_command'
	from /home/me/.bundle/ruby/3.2.0/gems/railties-7.2.1/lib/rails/command/base.rb:178:in `invoke_command'
	from /home/me/.bundle/ruby/3.2.0/gems/thor-1.3.2/lib/thor.rb:538:in `dispatch'
	from /home/me/.bundle/ruby/3.2.0/gems/railties-7.2.1/lib/rails/command/base.rb:73:in `perform'
	from /home/me/.bundle/ruby/3.2.0/gems/railties-7.2.1/lib/rails/command.rb:71:in `block in invoke'
	from /home/me/.bundle/ruby/3.2.0/gems/railties-7.2.1/lib/rails/command.rb:149:in `with_argv'
	from /home/me/.bundle/ruby/3.2.0/gems/railties-7.2.1/lib/rails/command.rb:69:in `invoke'
	from /home/me/.bundle/ruby/3.2.0/gems/railties-7.2.1/lib/rails/commands.rb:18:in `<main>'
	from <internal:/home/me/.asdf/installs/ruby/3.2.4/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from <internal:/home/me/.asdf/installs/ruby/3.2.4/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from /home/me/.bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from bin/rails:4:in `<main>'
@BuonOmo
Copy link
Member

BuonOmo commented Sep 18, 2024

Could it be related to #357 ? You are using rails 7.2.1 which is not yet supported. See #405 and try the branch bump-7-2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants