我在玩Geokit-Rails(https://github.com/andre/geokit-rails),我需要找到距離原點10英里範圍內的所有記錄。這是我的錯誤:未定義方法'merge_conditions'爲geokit-rails
Company.find(:all, :origin=>'New York, NY', :within=>10)
NoMethodError: undefined method `merge_conditions' for #<Class:0x0000010832f740>
from /Users/san/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.1/lib/active_record/base.rb:1016:in 'method_missing'
from /Users/san/Documents/sanj/app/vendor/plugins/geokit-rails/lib/geokit-rails/acts_as_mappable.rb:349:in `apply_bounds_conditions'
from /Users/san/Documents/sanj/app/vendor/plugins/geokit-rails/lib/geokit-rails/acts_as_mappable.rb:260:in `prepare_for_find_or_count'
from /Users/san/Documents/sanj/app/vendor/plugins/geokit-rails/lib/geokit-rails/acts_as_mappable.rb:152:in `find'
from (irb):4
from /Users/san/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.1/lib/rails/commands/console.rb:44:in `start'
from /Users/san/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.1/lib/rails/commands/console.rb:8:in `start'
from /Users/san/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.1/lib/rails/commands.rb:23:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
我在Company.rb acts_as_mappable
,我已經遷移列lat
和lng
到公司。我哪裏錯了?