samg / diffy

Easy Diffing in Ruby
http://rubygems.org/gems/diffy
MIT License
1.27k stars 104 forks source link

windows11 diff not found #115

Closed yamada153 closed 2 years ago

yamada153 commented 2 years ago

windows11 ruby3.0

HI, I get this error when I use it

[ERROR] Can't find a diff executable in PATH 
C:/Ruby30-x64/lib/ruby/gems/3.0.0/bin;C:\Program Files\ImageMagick-7.0.10-Q16-HDRI;
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\nodejs\;
C:\Ruby27-x64\Git\cmd;C:\Program Files (x86)\Vim\vim82;C:\Program Files\Redis\;
C:\Program Files\Git\cmd;C:\Ruby31-x64\bin;C:\Ruby30-x64\bin;C:\Users\amezi\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\heroku\bin;
C:\kotlinc\bin;C:\Users\amezi\AppData\Local\Microsoft\WindowsApps;C:\Program Files\PostgreSQL\13\bin
        C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/diffy-3.4.0/lib/diffy/diff.rb:169:in `diff_bin'

In the environment variable DIFFY_DIFF set "C:\Ruby30-x64\lib\lib\ruby\gems\3.0.0\gems\diffy-3.4.0\lib" or "C:\Ruby30-x64\lib\lib\ruby\gems\3.0.0\gems\diffy-3.4.0\lib\diffy" and this is what I got.

[ERROR] Can't execute diff program 'C:\Ruby30-x64\lib\ruby\gems\3.0.0\gems\diffy-3.4.0\lib\diffy'
        C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/diffy-3.4.0/lib/diffy/diff.rb:160:in `diff_bin'
ErCargo commented 2 years ago

  您好,邮件已收到!

yamada153 commented 2 years ago

C:\Ruby26-x64\msys64\usr\bin C:\Ruby26-x64\msys64\mingw64\bin

I set these two to the system environment variable Path and it worked. it looks like I didn't set up devkit properly. Sorry for the trouble.