views:

73

answers:

2

I put searchlogic in my gemfile... and now my rails server won't start :(

this is the errormessage

gems/ruby-1.8.7-p299/gems/activesupport-3.0.0/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method': undefined method `merge_joins' for class `Class' (NameError)
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/activesupport-3.0.0/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method_chain'
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/searchlogic-2.4.27/lib/searchlogic/active_record/consistency.rb:8:in `included'
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/searchlogic-2.4.27/lib/searchlogic/active_record/consistency.rb:7:in `class_eval'
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/searchlogic-2.4.27/lib/searchlogic/active_record/consistency.rb:7:in `included'
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/searchlogic-2.4.27/lib/searchlogic.rb:34:in `include'
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/searchlogic-2.4.27/lib/searchlogic.rb:34
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require'
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require'
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/bundler-1.0.0/lib/bundler/runtime.rb:62:in `each'
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/bundler-1.0.0/lib/bundler/runtime.rb:62:in `require'
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/bundler-1.0.0/lib/bundler/runtime.rb:51:in `each'
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/bundler-1.0.0/lib/bundler/runtime.rb:51:in `require'
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/bundler-1.0.0/lib/bundler.rb:112:in `require'
 from /Users/omiohoro/glowing-rain-75/config/application.rb:7
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/railties-3.0.0/lib/rails/commands.rb:28:in `require'
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/railties-3.0.0/lib/rails/commands.rb:28
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/railties-3.0.0/lib/rails/commands.rb:27:in `tap'
 from /Users/omiohoro/.rvm/gems/ruby-1.8.7-p299/gems/railties-3.0.0/lib/rails/commands.rb:27
 from script/rails:6:in `require'
 from script/rails:6

How Do I fix this? Thanks in advance cheers tabaluga

+1  A: 

In rails 3, you could use meta_search instead.

It is very similar to searchlogic but

<%= order @search, :by => :name, :as => "Order By Name" %>

is changed to

<%= sort_link @search, :name, "Order By Name" %>
PeterWong
thanks, hmpfh, but is there a way to make searchlogic work?
tabaluga
Matt has answered the way to get back searchlogic :D Actually meta_search works just like searchlogic and after replacing those `order` to `sort_link`, it should works as expected ^^
PeterWong
Roger that :) thanks
tabaluga
+2  A: 

There's the railsdog's searchlogic fork on github that supports Rails 3.

You can add it to your Gemfile like this:

gem 'rd_searchlogic', :require => 'searchlogic', :git => 'git://github.com/railsdog/searchlogic.git'
Matt
thankyou! thankyou! thankyou!
tabaluga