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.

有帮助吗?

解决方案

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)
)
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top