activerecord-mysql2spatial-adapter icon indicating copy to clipboard operation
activerecord-mysql2spatial-adapter copied to clipboard

Active Record 5

Open darkviolet0 opened this issue 8 years ago • 7 comments

Hello,

Seems that this does not work with rails 5 and Active Record 5, is someone working on updating this ? Thank you

darkviolet0 avatar Sep 21 '16 12:09 darkviolet0

I have absolutely no time spare to work on this till mid-October, so Pull Requests are welcome

januszm avatar Sep 21 '16 13:09 januszm

ok, would love to, but I'm pretty new to rails, should pass on this one.

darkviolet0 avatar Sep 21 '16 13:09 darkviolet0

I have been testing with this fork/branch combo: https://github.com/eastmeeteast/activerecord-mysql2spatial-adapter/tree/rails-5

So far, so good with Rails 5. I have only tested saving/retrieving points at this point, but those work as advertised.

You can add this to your Gemfile like so:

gem 'activerecord-mysql2spatial-adapter', github: 'eastmeeteast/activerecord-mysql2spatial-adapter', branch: 'rails-5'

I'll post a comment over there recommending a pull request of this for review.

jeremysnyder avatar Dec 02 '16 16:12 jeremysnyder

Thanks @jeremysnyder , I also started working on some small code clean ups. I'll hold off with my changes until yours are done.

januszm avatar Dec 02 '16 16:12 januszm

Full disclosure, this isn't my code, I just found it by looking through the forks. This seems to be the parent of the branch I previously suggested:

https://github.com/sebastianiorga/activerecord-mysql2spatial-adapter/tree/rails-5

Maybe you could ask them to start a pull request, or create one. I just spent a day or 2 working this, wanted to make sure I could pass along any information I have found.

Thanks for the work on this, it is shaping up to be very helpful.

jeremysnyder avatar Dec 02 '16 16:12 jeremysnyder

before couple of days, I ported postgis-adapter to mysql2. https://github.com/stadia/activerecord-mysql2rgeo-adapter

stadia avatar Feb 03 '17 10:02 stadia

stadia

Helped me in resolving "alert":"Mysql2::Error: FUNCTION <db_name>.GeomFromWKB does not exist: as an alternative to activerecord-mysql2spatial-adapter

mayuresh-srivastava avatar Jul 08 '22 06:07 mayuresh-srivastava