Installing Rails Plugins with Git on Windows
Wednesday, August 27th, 2008...10:28 pm
Ok, so everyone is the rails world seems to have moved over to Git for their version control (which is fine if you’re into the sort of thing). The downside of this is that Windows developers are left without much help when they want to install all those fabulous plugins hosted on GitHub (since most Git users are on Linux and most Rails hackers are on Macs). Well, here’s the trick I just learnt:
Go read this introduction to Git on Windows and install the command-line package of msysgit. Now, if you’ve got Rails 2.1 or later you should be able to do
ruby script\plugin install git://github.com/thoughtbot/shoulda.git
but it will fail with various errors, probably including “Plugin Not Found”. Instead, try:
ruby script\plugin install http://github.com/thoughtbot/shoulda.git/
It’s annoying but it works. Of course, you could just use git to clone the plugin into the directory but then you have to actually install it and I found it just got messy.
Update: I noticed that with a new Rails project I didn’t have this issue and the first method works fine. I’d upgraded the old pre-2.1 project but obviously something didn’t stick. So another method might be to recreate the project.
1 Comment
November 7th, 2008 at 1:13 pm
Thank you
Just spent an hour trying to make msysgit work to get a valuable plugin Revisionary. Your little tip saved me hours more.
My client on this project is a MS Windows agency 100%. They want their servers hooked into their domain, with their virus scanners and management tools installed. Ayup.
Developers don’t determine development environments - clients do.
Leave a Reply