Ruby 1.9.1 Compatibility + new IP geocoder in Geokit
Feb 14, 2009 by
Andre
- Adding GeoPluginGeocoder for IP geocoding (thanks github/xjunior)
- Ruby 1.9.1 compatibility and Unicode fixes (thanks github/Nielsomat)
- thanks other githubbers who fixed bugs/submitted patches
Comments
nc on Feb 17
Excellent work! Geokit is amazingly useful.
nc on Feb 17
I've poked around the source a bit, does Geokit have support for Rails named_scope?
Andre Lewis on Feb 17
@nc -- geokit doesn't currently support named scope. I'd love to get a patch for named scope if you're inclined :-)
Bruce on Feb 26
Hey Andre,
I'm getting an error after I deployed to my staging environment that disappears when i comment out the method call geocode_ip_address, in my controller. I have no problem in development.
the error is: "can't convert Hash into Integer" - and the framework trace including the lines:
/usr/local/lib/ruby/1.8/yaml/rubytypes.rb:15:in `to_yaml'
vendor/plugins/geokit-rails/lib/geokit-rails/ip_geocode_lookup.rb:29:in `store_ip_location'
Any ideas?
Kurien on Jun 23
"can't convert Hash into Integer"
I get the same error as indicated above
/usr/local/lib/ruby/1.9.1/yaml.rb:389:in `hash'
/usr/local/lib/ruby/1.9.1/yaml.rb:389:in `quick_emit'
/usr/local/lib/ruby/1.9.1/yaml/rubytypes.rb:107:in `to_yaml'
/usr/local/lib/ruby/1.9.1/yaml/rubytypes.rb:18:in `node_export'
/usr/local/lib/ruby/1.9.1/yaml/rubytypes.rb:18:in `add'
/usr/local/lib/ruby/1.9.1/yaml/rubytypes.rb:18:in `block (3 levels) in to_yaml'
/usr/local/lib/ruby/1.9.1/yaml/rubytypes.rb:17:in `each'
/usr/local/lib/ruby/1.9.1/yaml/rubytypes.rb:17:in `block (2 levels) in to_yaml'
/usr/local/lib/ruby/1.9.1/yaml/rubytypes.rb:16:in `map'
/usr/local/lib/ruby/1.9.1/yaml/rubytypes.rb:16:in `block in to_yaml'
/usr/local/lib/ruby/1.9.1/yaml.rb:391:in `call'
/usr/local/lib/ruby/1.9.1/yaml.rb:391:in `emit'
/usr/local/lib/ruby/1.9.1/yaml.rb:391:in `quick_emit'
/usr/local/lib/ruby/1.9.1/yaml/rubytypes.rb:15:in `to_yaml'
/home/kurien/spotitfast/vendor/plugins/geokit-rails/lib/geokit-rails/ip_geocode_lookup.rb:29:in `store_ip_location'