2

I am trying to use this forked version of the searchlogic gem. In my gemfile, I have

gem "searchlogic", :git => "http://github.com/railsdog/searchlogic.git"

when I do bundle install, I get this error:

Could not find gem 'searchlogic (>= 0, runtime)' in http://github.com/railsdog/searchlogic.git (at master).
Source does not contain any versions of 'searchlogic (>= 0, runtime)'

What is causing this error? Thanks for reading.

ben
  • 29,229
  • 42
  • 124
  • 179

4 Answers4

3

It's because your fork not define searchlogic gem by rd_searchlogic gem. So use in your Gemfile :

gem "rd_searchlogic", 
  :git => "rd_searchlogic.gemspec", 
  :require => "searchlogic"
Aman Garg
  • 4,198
  • 2
  • 21
  • 29
shingara
  • 46,608
  • 11
  • 99
  • 105
2

Use:

gem 'rd_searchlogic', :git => 'https://github.com/railsdog/searchlogic.git', :require => 'searchlogic'
Nakilon
  • 34,866
  • 14
  • 107
  • 142
francesc
  • 46
  • 2
1

The .gemspec of your fork might contain a different name to that of the gem on RubyGems, for example when I forked active_merchant on GitHub their .gemspec file had:

s.name         = 'activemerchant'

but the gem is defined as active_merchant on RubyGems so I changed my Gemfile from:

gem "active_merchant", git: "https://github.com/adamwaite/active_merchant.git", require: "active_merchant"

to:

gem "activemerchant", git: "https://github.com/adamwaite/active_merchant.git", require: "active_merchant"

note the lack of _.

All worked perfectly after that. This may be an obscure case, but hope it helps someone!

Adam Waite
  • 19,175
  • 22
  • 126
  • 148
-2

It doesn't look like that gem has been upgraded for Rails3. From the issues listed in Github, it seems that searchlogic is heavily dependent on ActiveRecord2 and may not be easily upgraded for Rails 3. It may be worth looking into an alternative.

Will searchlogic work with Rails 3?

http://github.com/binarylogic/searchlogic/issues/issue/65

Community
  • 1
  • 1
Bryan Marble
  • 3,467
  • 5
  • 26
  • 29
  • You're right :-) I removed at least one incorrect portion of my response, but I'll leave the remainder as I'm guessing there still might be a rails 3 compatibility issue, even if it is tangential to the original question. – Bryan Marble Oct 26 '10 at 13:05
  • i think this would still be better as a comment, not an answer – bonhoffer Jul 23 '11 at 18:01