#141 ✓ resolved
Thibaut Barrère

Cannot install sunspot RC2 on 1.9.2 (geohash build issue)

Reported by Thibaut Barrère | August 30th, 2010 @ 01:41 PM | in 1.2

Installation fails on ruby 1.9.2 (geohash cannot build):

  gem install sunspot --pre

Stack: http://gist.github.com/557237
Related: http://github.com/davetroy/geohash/issues#issue/1

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

  • Anthony Smith

    Anthony Smith September 11th, 2010 @ 01:40 PM

    floze on github has forked and patched geohash 1.1.0 for use with 1.9.

    http://github.com/floze/geohash

    In your Gemfile:

    gem 'geohash', :git => 'git://github.com/floze/geohash.git'

  • Anthony Smith

    Anthony Smith September 11th, 2010 @ 01:53 PM

    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:

    http://github.com/sticksnleaves/geohash

    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.

  • Anthony Smith

    Anthony Smith September 11th, 2010 @ 03:11 PM

    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.

  • Nick Zadrozny

    Nick Zadrozny September 16th, 2010 @ 07:38 PM

    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:
    http://github.com/nz/sunspot/compare/master...geohash

    I'll hold off on merging this for a few hours to give y'all some time to weigh in :)

  • Anthony Smith

    Anthony Smith September 20th, 2010 @ 03:25 PM

    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.

  • mat

    mat December 27th, 2010 @ 02:44 PM

    • Milestone set to 1.2
    • State changed from “new” to “resolved”
    • Milestone order changed from “34” to “0”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Awesome Solr interaction for Ruby

People watching this ticket

Tags

Pages