1

目前,我收到此错误:NameError: undefined methodmerge_joins' for classClass'

我只是在做

gem "searchlogic"

bundler 说它正在使用版本2.4.28

那么...在正确的 searchlogic 版本中与 rails 2.3.8 一起使用是什么?

searchlogic 2.4.28 是它开始需要 2.3.11 之前的最后一个可用版本 =\

NameError: undefined method `merge_joins' for class `Class'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/module/aliasing.rb:33:in `alias_method'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/module/aliasing.rb:33:in `alias_method_chain'
/Library/Ruby/Gems/1.8/gems/searchlogic-2.4.28/lib/searchlogic/active_record/consistency.rb:8:in `included'
/Library/Ruby/Gems/1.8/gems/searchlogic-2.4.28/lib/searchlogic/active_record/consistency.rb:7:in `class_eval'
/Library/Ruby/Gems/1.8/gems/searchlogic-2.4.28/lib/searchlogic/active_record/consistency.rb:7:in `included'
/Library/Ruby/Gems/1.8/gems/searchlogic-2.4.28/lib/searchlogic.rb:34:in `include'
/Library/Ruby/Gems/1.8/gems/searchlogic-2.4.28/lib/searchlogic.rb:34
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `require'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `require'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `each'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `require'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `each'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `require'
/Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler.rb:120:in `require'
~/category/app/config/environment.rb:16

在我的环境中的第 16 行,我这样做:

Bundler.require(:default)

编辑:宝石文件:

source "http://rubygems.org"
# system
gem "rails", "2.3.8"
gem "activesupport", "2.3.8", :require => "active_support"
gem "rake", "0.8.7"

# might be for POW, not sure
gem "childprocess", "0.2.2", :git => "git://github.com/jarib/childprocess.git"


# app
gem "mysql", "2.7"
gem "lockfile"
gem "ssl_requirement", "0.1.0"
gem "attr_encrypted", "1.1.2"
gem "searchlogic", "2.3.5"
gem "will_paginate", "2.3.14"

gem "garb", "0.7.6"
gem "delayed_job", "2.0.3"
gem "httparty", "0.5.2"


gem "pony", "1.1"
gem "friendly_id", "3.0.6"
gem "stringex", "1.1.0"
gem "i18n", "0.4.2"

gem "sms_fu", "1.1.1"
4

2 回答 2

0

看起来 2.3.5 有不错的 Rails 2.3.x 支持:

gem "searchlogic", :version => "2.3.5"

回顾项目的历史可以发现 Rails 2.3.11 依赖项是在 2.4.29 中添加的:

https://github.com/binarylogic/searchlogic/blob/v2.4.29/Gemfile

编辑:发现 Heroku 2.3.5 的一些证据可以与 Rails 2.3.8 一起使用,即使依赖项直到 2.4.28 才添加

于 2011-08-31T19:02:05.820 回答
0

事实证明,我可以使用的 searchlogic 版本不适用于捆绑程序,所以我只是将它保存在我的 environment.rb 中:

config.gem "searchlogic", :version => "whatever"
于 2011-09-01T13:25:26.760 回答