Open arghorashy opened 11 years ago
I don't actually have access to an XP box so I probably can't help troubleshoot this. @bwl21 added the windows support in https://github.com/samg/diffy/pull/16 so he may have some advice on how to make it work. I believe that there's significantly more work getting diffy to work on windows since diff
isn't a standard utility (diffy should basically work out of the box on *nix).
If you find ways to make it easier feel free to submit a pull request.
@arghorashy: could you please try putting the diff.exe and which.exe on a path without spaces?
In my installation it is on a path without spaces. If it solves the problem, I will look into it (later ... sorry)
otherweise, could you please provide me with a test case.
I placed diff and which in c:\unixutils (a path without spaces), changed my path and the errors went away.
Thanks, Grasswistle
It should not be closed. I should change it such that it also works with spaces in the path (even if I feel that spaces in the path is a real evil and spaces in default paths is simply stupid (thanks Micorsoft - and Apple ;-)
I'm using ruby 1.9.3p327 (2012-11-10) [i386-mingw32] under Windows XP SP 3.
Here are the steps I followed:
which diff
worked. Output: C:\Program Files\GnuWin32\bin\diff.EXEgem install diffy 2.1.2
.After all that, I tried using the following command in a script: puts Diffy::Diff.new(item, item2, :context => 5), where item and item2 are strings containing relative file paths (e.g., "./path to /file"). Unfortunately, I get the following error:
_C:/Ruby193/lib/ruby/gems/1.9.1/gems/diffy-2.1.2/lib/diffy/diff.rb:52:in'
`': No such file or directory - C:\Program Files\GnuWin32\bin\diff.exe -U 5 D:/DOCUME~1 /t0148524/LOCALS~1/Temp/diffy20131018-3216-9e9xgo D:/DOCUME~1/t0148524/LOCALS~1/ Temp/diffy20131018-3216-1l2fpzz (Errno::ENOENT) from C:/Ruby193/lib/ruby/gems/1.9.1/gems/diffy-2.1.2/lib/diffy/diff.rb:5 2:in
diff' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/diffy-2.1.2/lib/diffy/diff.rb:6 9:ineach' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/diffy-2.1.2/lib/diffy/format.rb :23:in
to_a' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/diffy-2.1.2/lib/diffy/format.rb :23:intext' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/diffy-2.1.2/lib/diffy/diff.rb:1 17:in
to_s' from script_diff.rb:44:inputs' from script_diff.rb:44:in
puts' from script_diff.rb:44:inblock (2 levels) in <main>' from script_diff.rb:19:in
block (2 levels) in cycleInDir' from script_diff.rb:19:inblock (2 levels) in cycleInDir' from script_diff.rb:22:in
block in cycleInDir' from script_diff.rb:11:inforeach' from script_diff.rb:11:in
cycleInDir' from script_diff.rb:19:inblock in cycleInDir' from script_diff.rb:11:in
foreach' from script_diff.rb:11:incycleInDir' from script_diff.rb:19:in
block in cycleInDir' from script_diff.rb:11:inforeach' from script_diff.rb:11:in
cycleInDir' from script_diff.rb:31:inblock in <main>' from script_diff.rb:22:in
block in cycleInDir' from script_diff.rb:11:inforeach' from script_diff.rb:11:in
cycleInDir' from scriptdiff.rb:30:in `I'm not sure what I'm doing wrong, but any help here would be appreciated!