nil
nil

Reputation: 2278

Setting up Rails Geocoder with Personal API Key

Rails Geocoder says not to use Key for Free version, to instead only use the key for Premier. The site i'm maintaining seems to be going over the limit not, so I set up a new api key and enabled billing.

I setup my initilizer like so

     Geocoder.configure(
    :timeout  => 5,
    :lookup   => :google,
    :api_key  => "ENTERED MY KEY HERE",
    :units    => :mi
    )

I Get a REQUEST DENIED in my logs. When I delete the file it uses geocoders default config and works. But my the morning it will stop working, assuming I'm going over the limit. Rather than setting up a Premier account, I enabled billing assuming we would just be charged the difference. I think I read $.50 per 1000 requests. Any Ideas?

Upvotes: 0

Views: 527

Answers (2)

nil
nil

Reputation: 2278

I sadly went with Microsoft's Bing service.

Upvotes: 0

Damien
Damien

Reputation: 27463

Cache your geocoding requests, it will save you some bucks (hopefully) and speed up your app (for sure).

Geocoder.configure(
  # ...
  :cache => Redis.current
)

Upvotes: 1

Related Questions