2

I have tried the last day to work with the Ruby gem git (version 1.2.5), but I am not sure that it works well enough. I stumbled over grit, which is more active, but was not able to get it working under Windows 7. Do you have used grit under Windows 7, especially to use the methods status, add and others?

My working environment:

  • Windows 7 64 bit
  • ruby 1.9.2p180 (2011-02-18) [i386-mingw32]
    • git 1.2.5
    • grit 2.4.1
  • I used the two only in a shell / IRB environment, to get a feeling if one or the other would be a good fit. I want it then to integrate it in my Rails application (as part of a Rake task).
mliebelt
  • 15,345
  • 7
  • 55
  • 92
  • Which Ruby version and Gems do you use and which Windows 7 do you use 32 or 64 Bit? The gem "git" is way more powerful then "grit". But grit has a better interface IMO. – ayckoster Mar 04 '12 at 14:27
  • By the way there is another Ruby interface to git called [Rugged](https://github.com/libgit2/rugged) that is based on [libgit2](https://github.com/libgit2/libgit2). libgit2 was written to [compile on Windows platforms](https://github.com/libgit2/libgit2/wiki/Building-libgit2-on-Windows). Rugged currently has some [build issues on Windows](https://github.com/libgit2/rugged/issues/43) but when these are resolved you should be able to use it. Rugged [apparently will replace](https://github.com/github/gollum/issues/356) grit on GitHub. – Brent Matzelle Jun 04 '12 at 14:13

2 Answers2

1

Unfortunately at this point and time the answer to your question apparently is "no". The grit gem requires the posix-spawn gem which, according to the project page, currently does not support Windows:

Potentially portable - abstracts lower-level process and stream management APIs so the class can be made to work on platforms like Java and Windows where UNIX process spawning and stream APIs are not supported.

The key above is "can be made to work on platforms like... Windows".

Brent Matzelle
  • 4,073
  • 3
  • 28
  • 27
0

I see a link on github related to this post - https://github.com/mojombo/grit/issues/4

Not sure how to use it though as I don't see open3_detach.rb file in Grit code.