Skip to content

May 12 / Rupak Ganguly

Installing Rails plugins from Github on Windows

Well, I have installed several Rails plugins but I was bummed when I tried to install the re-captcha plugin from Github. The command belwo just fails silently and creates an empty folder “recaptcha” under vendor/plugins:

ruby script/plugin install git://github.com/ambethia/recaptcha.git

Well, after a little googling, I found out here that using a http moniker instead of the git moniker would solve the issue like so:

ruby script/plugin install http://github.com/ambethia/recaptcha.git

Well, no  luck. Same empty folder. So, now reading the comment from Tom in the above article, I found out that what really works is the adding a trailing slash at the end of the above command like so:

ruby script/plugin install http://github.com/ambethia/recaptcha.git/

Bliss at last. The plugin directory has files now. Hope you did not have to spend too much time searching for this…

Update (02/22/2010):

I have noticed (so have many other users) that somewhere around Feb. 2010, the above method of installing the plugins do not work. I am investigating the issue with respect to different rails / ruby versions. I have tried with Rails 2.3.2, 2.3.5/Ruby 1.8.6, 1.8.7 and I have the issue. I will post an update if I find a solution. Till then, just download the zip file from Github downloads and copy it to your vendor/plugins folder. You can try cloning the github repo for the plugin as well if you choose to do so.

If you are using Ruby 1.9, try to see if the following fix resolves the issue:

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2018

28 Comments

leave a comment
  1. JoseG / May 22 2009

    I was banging my head on this, thanks for the post!!

  2. Tin / May 29 2009

    Great info, I have the same problem as you, after install git on windows, we must change the git moniker to http moniker and add / at the end.

    Thank you. Great blog

  3. Rupak Ganguly / Jun 11 2009

    @JoseG, @Tin: Thanks for your feedback. It is one of those things that behave differently on Windows, and I am trying to capture all these quirks on my blog. Nice to see it helped you.

  4. Rafeek / Jul 9 2009

    Hi,
    I am newbie to Ruby on rail. In my application, i tried a lot to include the ReCAPTCHA but it fails. I am using windows XP system so i downloaded the recaptch.gem from the ruby forge and installed in the ruby.
    Also registered with the Recaptcha to get the keys but i dont where is the problem i have still i cant see the captcha in my view section.

    can i have steps to follow on Recaptcha.

    THANKS
    Rafeek :)

  5. Rupak Ganguly / Jul 9 2009

    Hi Rafeek,
    Can you please try to explain all the steps you took to install Recaptcha? And, then can you please post snippets of your code that you have across files. I can then look and tell you what is wrong.

  6. Carl Youngblood / Jul 21 2009

    Thanks for the tip! I’m experiencing this same problem on OSX. This was really frustrating me.

  7. Stephen / Jul 28 2009

    Thanks so much for the great info!

  8. Rupak Ganguly / Jul 29 2009

    @Carl, @Stephen,
    Glad you liked the post. It is my goal to blog about these things that can make life easier for the Ruby on Rails developer on Windows. Check back for more.

  9. Fletch / Sep 7 2009

    Thanks. Good title that also made it easy to find in Google :-) .

  10. marcel / Sep 8 2009

    thanks man.
    i already was fighting back my tears

  11. Rupak Ganguly / Sep 9 2009

    @Fletch, @marcel,
    Glad this tip helped you. I try to document all the quirks that comes with running Ruby on Rails on Windows platform.

  12. about2flip / Oct 7 2009

    Thanks for this post, but I am getting ‘no such file or directory.’ What directory should I be in when I run this command? do I need to create a plugins folder first in my ruby directory?

    Thanks

  13. Rupak Ganguly / Oct 7 2009

    @about2flip: You should be in your Rails application folder. You do not need to create any plugin folders. Let me know if I can help further.

  14. vivek jain / Oct 8 2009

    Thanks buddy it help me alot and i am finally out this window github problem

  15. Rupak Ganguly / Oct 8 2009

    @vivek jain: You are very welcome. Glad I could help you out. Please subscribe to my feed and spread the word. I have dedicated this blog to Ruby on Rails users who work on Windows.

  16. manfred / Nov 21 2009

    gracias

  17. Randika Rathugama / Dec 14 2009

    Hello Rupak,
    Thank you for posting this, you just save my time.

  18. Rupak Ganguly / Dec 14 2009

    Hi Radhika,
    Glad I could help. Thanks for reading and subscribing to my blog. Happy Holidays.

  19. vyas / Feb 20 2010

    C:\Projects\rajdhani>ruby script/plugin install http://github.com/ambethia/recap
    tcha.git/
    Plugin not found: ["http://github.com/ambethia/recaptcha.git/"]

  20. jimmy / Feb 24 2010

    Hi i can’t get it to work, as i get “Plugin not found: ["http://github.com/edgarjs/ajaxful-rating.git/"]” when i typed: “ruby script/plugin install http://github.com/edgarjs/ajaxful-rating.git/” can some 1 help plz

  21. Marc Luzietti / Feb 24 2010

    I’m getting the same issue. I’m using Ruby 1.8.7, Rails 2.3.5, and Windows XP. I can’t load plugins even from a local source.

  22. Sharagoz / Mar 2 2010

    I’ve been intalling plugins from github from the command line on windows for a long time using this solution, but for some reason it stopped working in late February. My solution for now is to press “download from source” on github, and extract into the vendor folder manually. Not as 1337 hax0r as doing it from the command line, but only takes a few seconds longer.

  23. Jeff Steil / Mar 4 2010

    Like others, I am now experiencing this issue when installing plugins from github. It worked previously but as of late Feb. no longer works. I’ve tried Ruby 1.8.7/1.9.1, Rails 2.35, Windows 7 but haven’t been able to install any plugins. My workaround is the same as sharagoz, just grab the source from github and then extract manually. Not a big deal, but would rather have it work as intended. Will definitely be interested to hear if you find a solution to this.

  24. manmohan / Mar 12 2010

    thank you , thank you, thank you ………. i was having same issue with some other plugins as well …… u made my day dude

    thank you once again

  25. Rupak Ganguly / Mar 12 2010

    Hi Manmohan,
    Great to hear that the post helped you. Now, me and my readers would be grateful if you could comment back with your Rails/Ruby versions. It will help us document the environments that the fix works. Thanks.

  26. ReggieB / Mar 30 2010

    I too am having the same problem with gems on Windows 7 (Rails 2.3.5, Ruby 1.8.7), and like others I’ve got around it by downloading the source files and copying them into vendor/plugins. I thought this may be a network issue and that the system just couldn’t find the gem repository. However, I get the same problem trying to install from a local gem file. Has anyone else tried this?

  27. Baw4h / Apr 14 2010

    Same problem as others. Running XP, Rails 2.3.5, Ruby 1.8.6 I thought there would be more than just copying the files into the vendor folder. It appears to be this simple, though. I thought the plugin had to be registered, or something. Nope.

  28. Brad Werth / Apr 23 2010

    Had the same issue, http and trailing slash did not fix it. Fix by applying a variation on the suggestion from here http://groups.google.ca/group/rubyonrails-talk/browse_thread/thread/20cb12085cb7991e . Basically, /mswin/ is not matching i386-mingw32.

Leave a Comment