title: Use proxy IP with a ruby script
body: <p>I am trying to run a ruby script from my computer and I would like to have the script use a proxy IP address / server that I have setup, as opposed to the default IP address associated with my local machine. </p>
  
  <p>I have been able to get my web browsers to use this proxy IP address by making changes inside network settings. But When I run the ruby script from textmate, it doesn't seem to use the proxy IP address I have put into my network settings. Instead it defaults back to the base ip address of my local machine.</p>
  
  <p>Is there anything I can do in textmate or in the script itself to specify a proxy IP address it should route through?</p>
  
  <p>My script looks like the following:</p>
  
  <pre><code>require "open-uri"
  url = "some-url"
  pattern = "&lt;img"   
  
  
  page = open(url).read
  tags = page.scan(pattern)
  puts "The site #{url} has #{tags.length} img tags"
  </code></pre>
  
  <p>Thanks for your help!</p>