I have a rails application. Rails version is 2.3.4
and ruby version 1.8.7
. In that application I used geokit (1.5.0) gem
and geokit-rail
s plugin to find nearest location.
And in my model I have code like this,
class Notary < ActiveRecord::Base
acts_as_mappable
end
And in my controller have code like this,
class Client::OrdersController < ApplicationController
def find_notary
@order = Order.find(params[:id])
@miles = 10
unless params[:notary_search]
@notaries = Notary.find(:all, :origin => @order.signing_location_zip_code, :within => @miles, :conditions => "on_vacation IS NOT true",:order=>"distance asc" )
else
some code
end
end
end
I am getting error in that line
@notaries = Notary.find(:all, :origin => @order.signing_location_zip_code, :within => @miles, :conditions => "on_vacation IS NOT true",:order=>"distance asc") like this,
Geokit::Geocoders::GeocodeError in Client/ordersController#find_notary
Geokit::Geocoders::GeocodeError
RAILS_ROOT: /home/user/svnnew_app/trunk/app
Application Trace | Framework Trace | Full Trace
/home/user/.rvm/gems/ruby-1.8.7-p371@app/gems/geokit-1.5.0/lib/geokit/mappable.rb:282:in `normalize'
/home/user/svnnew_app/trunk/app/vendor/plugins/geokit-rails/lib/geokit-rails/acts_as_mappable.rb:347:in `normalize_point_to_lat_lng'
/home/user/svnnew_app/trunk/app/vendor/plugins/geokit-rails/lib/geokit-rails/acts_as_mappable.rb:306:in `extract_origin_from_options'
/home/user/svnnew_app/trunk/app/vendor/plugins/geokit-rails/lib/geokit-rails/acts_as_mappable.rb:203:in `prepare_for_find_or_count'
/home/user/svnnew_app/trunk/app/vendor/plugins/geokit-rails/lib/geokit-rails/acts_as_mappable.rb:108:in `find'
/home/user/svnnew_app/trunk/app/app/controllers/client/orders_controller.rb:331:in `find_notary'
Request
Parameters:
{"id"=>"1198"}
Show session dump Response
Headers:
{"Cache-Control"=>"no-cache", "Content-Type"=>""}
How to resolve this error? Please help me out..