Wednesday, July 1, 2009

Installing Rails plugin from Github on Windows

One more pain when coding on windows (as if I was born using Unix/Linux etc ;)))... but try installing a plugin -

ruby script/plugin install git://github.com/toamitkumar/extra_sanitize.git

and it will fail with an empty folder.

After googling found a way -> here which suggests using http instead of git protocol.

ruby script/plugin install http://github.com/toamitkumar/extra_sanitize.git

Well this also failed with an empty folder. After hours of struggling found adding a trailing forward slash to the url did the trick.

ruby script/plugin install http://github.com/toamitkumar/extra_sanitize.git/

It works now....

2 comments:

alex rothenberg said...

Amit,

I'm not sure if you problems come from using Windows or going though a firewall that blocks the git. I know our firewall at work restricts port 9418 and I've seen these posts talking about how to deal with firewalls restricting git Which Git Protocol to Use or Using Github Through Draconian Proxies (Windows And Unix)

--Alex

Amit Kumar said...

Its both Alex...
The command ruby script/plugin install http://github.com/toamitkumar/extra_sanitize.git/ works on windows and also behind our firewall. So makes life of us ruby developers easier just using simple command instead of following draconian proxy thing...