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
April 2008
M T W T F S S
« Mar   May »
 123456
78910111213
14151617181920
21222324252627
282930  
Add to Technorati Favorites

Syndicate This Blog
Entries (RSS)
Comments (RSS)

Proxy Issues while installing Rails Plugins

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)

Leave a Reply

This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 5 chars within 0..9 and A..F, and submit the form.

  

Oh no, I cannot read this. Please, generate a

    Licensed under
Creative Commons License
Design by vikivix