rgeo/activerecord-postgis-adapter

"Wrong number of arguments" running `rake db:gis:setup` on JRuby

aschmied opened this issue · 1 comments

Environment

  • Windows 10
  • activerecord (5.0.6)
  • activerecord-jdbc-adapter (50.0)
  • activerecord-jdbcpostgresql-adapter (50.0)
  • activerecord-postgis-adapter (4.1.2)
  • rgeo-activerecord (6.0.0)
  • rgeo (1.0.0)

Steps

  1. Install GEOS
  2. Update Gemfile and configured databse.yml for an existing JRuby on Rails app according to the activerecord-postgis README
  3. run rake db:gis:setup

Result

This exception:

ArgumentError: wrong number of arguments (3 for 4)

Notes

The exception is thrown from this line in activerecord-jdbc-adapter, but the root cause is this line in postgis_adapter. PostGISAdapter extends a class with a 3-argument constructor then calls super in a 4-argument constructor. It needs to call super(connection, logger, config).

It looks like this might be fixed by this AR-JDBC-Adapter issue