title: How to set a proxy in rubys net/http?
body: <p>I'm trying to set a proxy and to use it in a simple get request like in the <a href="http://ruby-doc.org/stdlib-2.0/libdoc/net/http/rdoc/Net/HTTP.html" rel="noreferrer">documentation</a>.
  But I always receive an error!
  The adress and port are right with open-uri it worked.. it's
  <code>http://proxy:8080</code> .</p>
  <pre><code>proxy_addr = 'proxy'
  proxy_port = 8080
  
  Net::HTTP.new('google.de', nil, proxy_addr, proxy_port).start { |http|
    # always proxy via your.proxy.addr:8080
    Net::HTTP.get('google.de', '')
  }
  </code></pre>
  <p>What am I doing wrong?
  Thanks for all answers!</p>