Question

I am a beginner in Rails. I got to know exciting feature of geocoder from railscasts [ http://railscasts.com/episodes/273-geocoder ]

But same source code also downloaded from it not working behind proxy. as it doesn't populate any longitudes or latitudes.

How to deal with with proxyserver of my workspace network? else from another machine having direct internet connection things work fine.

Was it helpful?

Solution

geocoder has http proxy support, but it's not obvious from the documentation for where to configure it.

you can find it when looking at the initializer, that should get created for your rails generate call: https://github.com/alexreisner/geocoder/blob/master/lib/generators/geocoder/config/templates/initializer.rb

Geocoder.configure(
  [...]
  # :http_proxy   => nil,         # HTTP proxy server (user:pass@host:port)
  # :https_proxy  => nil,         # HTTPS proxy server (user:pass@host:port)
)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top