Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About half of methods don't seem to work #1

Open
djvs opened this issue Jan 17, 2015 · 6 comments
Open

About half of methods don't seem to work #1

djvs opened this issue Jan 17, 2015 · 6 comments

Comments

@djvs
Copy link

djvs commented Jan 17, 2015

Ex:

    users = base.select{|x|GeoDistance::Haversine.geo_distance(mylat,mylong,x.lat,x.long).to_miles <= dist}

undefined method `geo_distance' for GeoDistance::Haversine:Class

Change it to the .distance method? Nope:

undefined method `to_miles' for #<GeoDistance::Distance:0x000000038686e0 @distance=0.0>

So I do;

    users = base.select{|x|GeoDistance::Haversine.distance(mylat,mylong,x.lat,x.long).distance <= dist}

Of course now I'm stuck using radians. I guess I multiply the number * 630.0944 to get the right number? (3959 / 2*pi). Hell if I know.

@kristianmandrup
Copy link
Owner

I'm sorry. I stopped using Rails 2 years ago. I guess it needs some more work... but I don't belive "half of the methods don't work"... I think it just needs a few tweaks. Try to clone it and see how far you get in a couple of hours. Look at the specs and improve ;) Cheers!

@gonzalocasas
Copy link

I get that you don't want to work on this anymore, but the current state is really broken, perhaps you could roll back to a previous gem release, because now we got dependency services bitching about outdated dependencies and the updated one just doesn't work. Also note that you bumped the patch (3rd digit) version which makes it sound like a trivial non-breaking change when that's not the case.

Today I did what you suggested, cloned it and tried to fix, but after an hour of fiddling, I gave up because there's a whole chain of dependencies that breaks things, after fixing rpd, I got a nil cannot be coherced... and after fixing all errors, I found that the geo_units gem is outputting crap on the console (e.g. to_coords [47.566667, 7.6] - lat_lng - Array) and even thou you fixed that already, you did not publish the fix to gem server, so I would need to fork your entire constellation of geo_* repos and fix it, and tbh, that's too much work.

So, it would be really appreciated if you either rollback or fix this.

Thx

@kristianmandrup
Copy link
Owner

Yeah, I'm really sorry. I was trying to be clever, splitting it up in multiple smaller gems but then ended up in a dependency nightmare. I think there must be other/better geo solutions out there to suit your needs?

If you really want this functionality, take what you need and like, mix it into your own thing and discard the rest. I won't do any more ruby development if I can help it...

I agree, that trying to resolve this mess is likely futile unless you have 2-3 days to spare.

@kristianmandrup
Copy link
Owner

OK, I will try to fix it now. Could you post your changes ;) thanks!

@gonzalocasas
Copy link

Nice to hear that. Unfortunately I don't have the changes anymore

@kristianmandrup
Copy link
Owner

kristianmandrup commented Oct 12, 2017

I did quite a bit of work on it today. Check the new-refactor branch.
Not quite working yet, but a lot better than before...

Also added a broken status notice at the top of the readme as you suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants