Installing a Ruby on Rails Plugin from a Github Branch

One of the coolest things about Git is how easy it makes working with branches. Rails has been playing catch up with Git’s distributed methodologies and recently took a nice step forward. Previously you could only useĀ ./script/plugin install to install from the master branch of a Github repository. Now you can specify the branch name when installing the plugin

./script/plugin install git://github.com/technoweenie/restful-authentication.git -r modular

This will install the modular branch of the Restful Authentication plugin. Pretty cool, huh?

At the time of writing this Rails 2.2 has not been released. If you are using Rails 2.1.0 or 2.1.1 you will need to upgrade to Edge Rails for this to work. Otherwise you will have to wait for 2.2 to be released.

7 Comments

  1. Mark
    Posted September 19, 2008 at 2:20 pm | Permalink

    This is just for Github you know. It works with any git repo.

  2. Andy P
    Posted October 10, 2008 at 9:00 am | Permalink

    Is the fact that you used the modular branch kept in your project somewhere, so when you come back to it a couple of monnths later, you can easily find out that RA isn’t working as expected cos your using modular instead of master?

    Also is there any way to update the plugin correctly?

  3. Bert
    Posted November 22, 2008 at 11:56 am | Permalink

    I’m completely new to Rails (and new to programming) and am in the process of developing a social network. I am trying to install the restful authentication plug-in with no luck. I’m using rails 2.1.1 and Windows XP. Where do I download this plug-in from? and once downloaded, what file do I put it in? (e.g., should I include in the InstantRails folder?)

  4. Thedon
    Posted December 13, 2008 at 7:43 am | Permalink

    if the above doesn’t work, try:
    git clone git://github.com/foo/kung-foo.git vendor/plugins/kung-foo && rm -rf vendor/plugins/kung-foo/.git

  5. Ryan
    Posted December 15, 2008 at 10:46 am | Permalink

    On Windows you need to ensure you have git installed via cygwin. Then in cygwin you can use the command documented above.

  6. Posted April 22, 2010 at 4:26 pm | Permalink

    I needed this. Your site came up first. I freaking know you. That’s pretty sweet.

  7. rahul
    Posted May 25, 2010 at 11:51 pm | Permalink

    hi
    doesnt work.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*