I followed the instructions on installing geokit-rails (v 2.0.1) and geokit (v 1.8.5). Then attempted to create my own geocoder (to be used with tests). Here is the code I use in my config/initializers/fake_geocoder.rb file
require 'geokit'
module GeoKit
module Geocoders
class FakeGeocoder < Geocoder
#to use, include :fake in the list of geocoders
private
def self.do_geocode(location, options = {})
geocode_payload = GeoKit::GeoLoc.new(:lat => 123.456, :lng => 123.456)
geocode_payload.success = true
return geocode_payload
end
end
end
end
When attempting to start up the rails console (bundle exec rails c), I get the following error:
../config/initializers/fake_geocoder.rb:6:in `<module:Geocoders>': uninitialized constant GeoKit::Geocoders::Geocoder (NameError)
from ../config/initializers/fake_geocoder.rb:5:in `<module:GeoKit>'
from ../config/initializers/fake_geocoder.rb:4:in `<top (required)>'
Any advice you can provide as to why it can't find the Geocoder class would be greatly appreciated.