Pergunta

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.

Foi útil?

Solução

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)
)
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top