Support Requests: Browse | Submit New | Admin

[#8064] GoogleGeocode Acting Funny

Date:
2007-01-22 16:48
Priority:
3
Submitted By:
James Herdman (biocs_nerd)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
GoogleGeocode Acting Funny

Detailed description
I'm getting a NoMethodError today when using Google Geocode.  Here's a sample from my Rails console:

--[BEGIN]--
Loading development environment.>> gg = GoogleGeocode.new(GOOGLE_MAPS_KEY)=> #<GoogleGeocode:0x32f8854
@key="[censored]", @url=#<URI::HTTP:0x197c18c URL:http://maps.google.com/maps/>>>>
gg.locate("90210")NoMethodError: You have a nil object when you didn't expect it!The error occurred while
evaluating nil.text        from ./script/../config/../config/../vendor/google_geocode.rb:60:in `parse_response'    
from ./script/../config/../config/../vendor/rc_rest.rb:104:in `get'        from /usr/local/lib/ruby/1.8/open-uri.rb:135:in
`open_uri'        from /usr/local/lib/ruby/1.8/open-uri.rb:528:in `open'        from
./script/../config/../config/../vendor/rc_rest.rb:99:in `get'        from
./script/../config/../config/../vendor/google_geocode.rb:51:in `locate'        from (irb):2
--[END]--

Any ideas?  It's almost as if the Google server isn't responding to the request.

Thank you.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-07-24 19:17
Sender: Brent Collier

I just recently encountered this issue...

 undefined method `text' for nil:NilClass
 /usr/lib/ruby/gems/1.8/gems/google-geocode-1.2.1/lib/google_geoc
ode.rb:60:in `parse_response'

-------------------------------
Backtrace:
-------------------------------

 /usr/lib/ruby/gems/1.8/gems/google-geocode-1.2.1/lib/google_geoc
ode.rb:60:in `parse_response'
 /usr/lib/ruby/gems/1.8/gems/rc-rest-2.2.1/lib/rc_rest.rb:125:in
`get'
 /usr/lib/ruby/1.8/open-uri.rb:135:in `open_uri'
 /usr/lib/ruby/1.8/open-uri.rb:519:in `open'
 /usr/lib/ruby/gems/1.8/gems/rc-rest-2.2.1/lib/rc_rest.rb:120:in
`get'
 /usr/lib/ruby/gems/1.8/gems/google-geocode-1.2.1/lib/google_geoc
ode.rb:51:in `locate'

Is this just a hiccup in Google's geocoding service?
Date: 2007-01-22 23:30
Sender: James Herdman

Never mind.  The problem has mysteriously vanished.  =/

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item