activerecord-mysql2spatial-adapter
activerecord-mysql2spatial-adapter copied to clipboard
Active Record 5
Hello,
Seems that this does not work with rails 5 and Active Record 5, is someone working on updating this ? Thank you
I have absolutely no time spare to work on this till mid-October, so Pull Requests are welcome
ok, would love to, but I'm pretty new to rails, should pass on this one.
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.
Thanks @jeremysnyder , I also started working on some small code clean ups. I'll hold off with my changes until yours are done.
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.
before couple of days, I ported postgis-adapter to mysql2. https://github.com/stadia/activerecord-mysql2rgeo-adapter
stadia
Helped me in resolving "alert":"Mysql2::Error: FUNCTION <db_name>.GeomFromWKB does not exist:
as an alternative to activerecord-mysql2spatial-adapter