title: How to route a program through HTTP proxy on linux
body: <p>I am working on ubuntu machine behind an institute's HTTP proxy which requires username:password authentication. There are some programs like rubygem installer(gem install *) which have very poor way of proxy handling.
  <br><br>
  How to reroute that through a proxy program so that I don't have to use proxy in rubygems(or similar) program? A very similar example of what I am talking about is Proxifier on Windows.</p>
  
  <p>What I have tried so far : <br>
  1. Setting proxy in the program ( works, but very poor proxy handling of the particular program)<br>
  2. Set environment proxy variable. (didn't work)<br>
  3. Use proxychains. (perhaps to complicated and does not work on single HTTP proxy.)<br>
  4. Searching on web. (Searched a lot. Didn't find any satisfactory solution)<br><br></p>
  
  <p>P.S. Rubygems is just an example. There are lot many programs I use have such problem.</p>