Skip to content

Support ActiveRecord 4.2 #12

@fjl82

Description

@fjl82

The current version requires rgeo-activerecord 0.4.*, which does not work with AR 4.2:

E, [2014-12-23T09:54:57.557146 #3627] ERROR -- : undefined method `attribute_types_cached_by_default' for ActiveRecord::Base:Class (NoMethodError)
/var/lib/gems/2.0.0/gems/activerecord-4.2.0/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
/var/lib/gems/2.0.0/gems/rgeo-activerecord-0.4.6/lib/rgeo/active_record/common_adapter_elements.rb:159:in `<module:ActiveRecord>'
/var/lib/gems/2.0.0/gems/rgeo-activerecord-0.4.6/lib/rgeo/active_record/common_adapter_elements.rb:47:in `<module:RGeo>'
/var/lib/gems/2.0.0/gems/rgeo-activerecord-0.4.6/lib/rgeo/active_record/common_adapter_elements.rb:45:in `<top (required)>'

Please update the adapter to support newer versions of rgeo-activerecord.

Activity

teeparham

teeparham commented on Dec 24, 2014

@teeparham
Member

See #13

fjl82

fjl82 commented on Dec 24, 2014

@fjl82
Author

Thanks for the heads-up. I don't want to become a maintainer (I don't code in my free time and I don't have time at work to take care of bug reports and things), but I had some time today to take a look at it myself and came up with this:
https://github.com/fjl82/activerecord-mysql2spatial-adapter
I can't give any guarantees that it works for everyone but it works for me on AR4.2 in the 2 projects that I use the adapter in. I don't have time to figure out how to make the tests run, so they won't work for now.

benatkin

benatkin commented on Apr 9, 2015

@benatkin

@fjl82 nice work!

@teeparham we're using this at @townsquared. I'm willing to start maintaining it. I would start just by merging @fjl82's change and making the test suite run on rails 4.2.

teeparham

teeparham commented on Apr 9, 2015

@teeparham
Member

@benatkin Hey good to hear from you! I added you to the rgeo organization. I'll add you as a gem owner so you can release new versions.

benatkin

benatkin commented on Apr 9, 2015

@benatkin

@teeparham thanks! looking forward to getting this on travis-ci and cutting a new version.

loganbu

loganbu commented on Apr 19, 2015

@loganbu

@fjl82 - Thanks for making that port! I noticed at least one issue in my project, where the adapter didn't properly look up 'point' columns - it thought they were 'int'. I sent you a pull request with ferry-vd#1.

fjl82

fjl82 commented on Apr 20, 2015

@fjl82
Author

@agoln thanks for the fix, I merged the pull request. Looking forward to a new official release :)

jdart

jdart commented on May 13, 2015

@jdart

+1 looking forward to new release.

geniousli

geniousli commented on Jun 30, 2015

@geniousli

does it support in AR4.2?

agodel

agodel commented on Nov 30, 2015

@agodel

Any updates on support for 4.2?

dannyyu92

dannyyu92 commented on Mar 3, 2016

@dannyyu92

+1

dschweisguth

dschweisguth commented on Aug 26, 2016

@dschweisguth
Contributor

@fjl82's fork works for me, with one additional change that fixes a NoMethodError when a table has a spatial index: dschweisguth@eced87f

stephenq

stephenq commented on Mar 7, 2017

@stephenq

Will this ever get worked into a release?

januszm

januszm commented on Mar 7, 2017

@januszm
Contributor

Sorry guys, this project was shelved for some time because of lack of resources and support. If I understand correctly you'd like to go with flj82's fork with some patches like dschweisguth/activerecord-mysql2spatial-adapter@eced87f ?

dschweisguth

dschweisguth commented on Mar 7, 2017

@dschweisguth
Contributor

That's working for me, so it would be helpful to me to have it on master. However, I don't have deep understanding of the code, I just made it work, so it's possible that a different solution would be better.

8 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @benatkin@teeparham@jdart@dschweisguth@januszm

      Issue actions

        Support ActiveRecord 4.2 · Issue #12 · rgeo/activerecord-mysql2spatial-adapter