NOTE: as of 0.3.0, and ActiveRecord 3.1 - the ActiveRecord adapter has been pulled out of this gem and into ActiveRecord
itself. If you need to use mysql2 with Rails versions < 3.1 make sure and specify gem "mysql2", "~> 0.2.7" in your Gemfile"
Indeed, the result of using mysql2 0.3.8 and ActiveRecord 3.0.10 is:
RuntimeError: Please install the mysql2spatial adapter: `gem install activerecord-mysql2spatial-adapter` (no such file to load -- active_record/connection_adapters/mysql2_adapter)
from /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/connection_specification.rb:71:in `establish_connection'
So it seems like activerecord-mysql2spatial-adapter should use mysql2 version 0.2.7 instead when used with ActiveRecord <= 3.0.x, and mysql2 0.3.8 when used with ActiveRecord >= 3.1.
The required mysql2 gem version, >= 0.3.6, leads to an incompatibility with ActiveRecord <= 3.0.x.
activerecord-mysql2spatial-adapter (on https://github.com/dazuma/activerecord-mysql2spatial-adapter ) claims to need:
However mysql2 specifically disallows this combination (on https://github.com/brianmario/mysql2 ):
Indeed, the result of using mysql2 0.3.8 and ActiveRecord 3.0.10 is:
So it seems like activerecord-mysql2spatial-adapter should use mysql2 version 0.2.7 instead when used with ActiveRecord <= 3.0.x, and mysql2 0.3.8 when used with ActiveRecord >= 3.1.