0

I've set up geokit and geokit-rails and for the most part everything is working. I'm now hitting some 'too many queries' issues during development and I suspect the culprit may be not providing an api_key to the Google Geocoder API. I set up a geokit_config.rb as described in the README, but get an error on providing an api_key to Google.

....geokit_config.rb:33:in `<top (required)>': undefined method `api_key=' for Geokit::Geocoders::GoogleGeocoder:Class (NoMethodError)

Tried tinkering with a few different things but haven't had any luck. I've exhausted any related posts on Google and SO and haven't found anything there. Even tried overriding the google.rb module with an explicit setter for self.api_key. No luck. Anyone have any ideas?

justinraczak
  • 776
  • 2
  • 9
  • 24

1 Answers1

2

The README is for 1.8.5 which includes support for Google's public API (https://github.com/geokit/geokit/commit/2bc71d541b0983372e34fdf1fedb0b2bea2fb76b)

However the published version is 1.8.4 which does not support the public API

You can fix this by pulling master directly from github until 1.8.5 is published.

gem 'geokit', branch: 'master', git: 'https://github.com/geokit/geokit.git'
roo
  • 7,106
  • 8
  • 39
  • 45
  • This worked like a charm. Error resolved and I see my calls reporting in the API console now. Thanks so much for the reply! – justinraczak Jun 03 '14 at 23:18
  • 2
    No worries. Looking at the commit log I see that 1.8.5 has been released - https://github.com/geokit/geokit/commit/1f06df19d64fc2e6602d87ceed9f57321c8cf19e – roo Jun 04 '14 at 05:27