I worte the below code, just to start the Nokogiri to mee the requirement and when I ran it for testing got the error:
D:\\WIPData\\Ruby\\Scripts>Nokogiri.rb
It appears you need to configure a proxy. Find out what the proxy URL/Port is for your organization (and whether there needs to be authentication). You may be able to view this information from your browser configuration. In order to use it with your Ruby code, you need to set the HTTP_PROXY
environment variable.
You can set it in Ruby code:
ENV['HTTP_PROXY'] = 'http://hostname:port'
or if you need authentication:
ENV['HTTP_PROXY'] = 'http://username:password@hostname:port'
A more permanent solution is to set HTTP_PROXY
in your system environment variables.