About   Forum   Wiki   Home  

       
    Managed Chaos      
   
Naresh Jain’s Weblog on Object thinking, Patterns, Open Source, Agile and Adventure Sports

 
`
 
Tags
Recent Comments
Quick Search
Recent Entries
Categories
Archives
July 2008
M T W T F S S
« Jun    
 123456
78910111213
14151617181920
21222324252627
28293031  
Add to Technorati Favorites

Syndicate This Blog
Entries (RSS)
Comments (RSS)

Archive for the ‘Tips’ Category

Proxy Issues while installing Rails Plugins

Wednesday, April 23rd, 2008

I’m trying to install restful_authentication plugin on a rails project on a Windows platform.

Every time I try “ruby script\plugin install http://svn.techno-weenie.net/projects/plugins/restful_authentication/”

I get the following error:

Plugin not found: ["http://svn.techno-weenie.net/projects/plugins/restful_authentication/"]

This really does not help. When you pass the verbose parameter to the install command, it give a more meaningful error message.

ruby script\plugin -v install http://svn.techno-weenie.net/projects/plugins/restful_authentication/
Plugins will be installed using http fetching from ‘http://svn.techno-weenie.net/projects/plugins/restful_authentication/’
Plugin not found: ["http://svn.techno-weenie.net/projects/plugins/restful_authentication/"]
# openuri::httperror: /openuri::httperror:

When you search for this error, it becomes very clear that its a proxy issue. Following is the solution given by Nick Chistyakov

This `407 Proxy Authentication Required’ happens because along with proxy address and proxy port two additional params must by supplied:
1. user
2. password

In open-uri.rb (under \ruby\lib\ruby\1.8 folder), method OpenURI.open_http, line 216 there is a record:
klass = Net::HTTP::Proxy(proxy.host, proxy.port)

The full signature of that Net::HTTP::Proxy(…) method is:
def Net::HTTP.Proxy(p_addr, p_port = nil, p_user = nil, p_pass = nil)
So just add proxy.user, proxy.password:

klass = Net::HTTP::Proxy(proxy.host, proxy.port, proxy.user, proxy.password)

Note that your environment variable http_proxy must be set in a way it described above (http_proxy=http://user:password@host:port)

Setting Proxy for a Commmand Prompt

Friday, March 21st, 2008

On Windows, if you are trying to run commands which access internet and stuck behind a proxy; here is a quick solution:

set http_proxy=http://username:password@proxy_ip_address:port

Thanks to Jigar Gosar for pointing this out.

    Licensed under
Creative Commons License
Design by vikivix