Cannot install sunspot RC2 on 1.9.2 (geohash build issue)
Installation fails on ruby 1.9.2 (geohash cannot build):
gem install sunspot --pre
The non-RC installs properly:
gem install sunsport
Note from Mat (email:)
Seems like it should be pretty easy to patch Geohash to be 1.9-compatible or, in the worst case, just fall back on a pure-ruby geohashing implementation for 1.9 installations.
Comments and changes to this ticket
Sorry, floze's geohash is only at version 1.0.1.
davetroy's geohash is currently at 1.1.0 in his master branch.
If you want a Ruby 1.9 compatible geohash at version 1.1.0 you can use my fork:
gem 'geohash', :git => 'git://github.com/sticksnleaves/geohash.git'
I haven't done much in the way of testing (I don't know if floze has either). However, it will compile and allow you to install sunspot --pre.
What is the purpose of geohash in sunspot? Is it required to be a hard dependency or could it be a soft dependency and just documented? If it's required would it be appropriate to switch to a geohash library that is under active development? No development has occurred on davetroy's master branch since 2008.
Stumbled across this today myself, thought I'd take a crack at it.
I see Anthony's changes have been merged back into geohash proper. That's promising. Hopefully we'll see an update of that gem soon. In the mean time, I like the idea of making the C extension geohash gem a soft dependency and using the pure ruby implementation as a hard dependency. Require geohash if available, otherwise fall back to pr_geohash.
Fortunately the two gems have an identical API, so the changes were minimal:
I'll hold off on merging this for a few hours to give y'all some time to weigh in :)
Sorry I didn't see this sooner.
Everything you proposed seems sound to me. Having the C geohash library is nice for performance reasons but most people probably won't need to take advantage of it so making it a soft dependency makes more sense.
This is old news by now I'm sure. Sorry again for the late reply.