samg / diffy

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

File Diffy doesn't work #70

Open busebse opened 8 years ago

busebse commented 8 years ago

I tried to run this command: puts Diffy::Diff.new('/tmp/foo', '/tmp/bar', :source => 'files') (i put foo and bar folders into tmp). But it gets this error messages.

Error messages: image

samg commented 8 years ago

From the looks of the error message it seems like ldiff isn't able to find the files based on the paths you're providing. It's possible this is related to the fact that you're running on Windows (in general it's harder to get Ruby stuff to work on Windows). You may need to specify the file paths in a Windows specific way, for example 'C:/tmp/foo' or 'C:\tmp\foo'. I don't have a windows setup to test on, but most likely you'll want to specify the file paths the same way as if you were passing them as arguments to ldiff on the command line.

Also you stated that you put foo and bar folders in tmp. You'll want to make sure that the paths you're passing diffy refer to files and not directories. Diffy doesn't have the ability to diff directories built in.

Hope that helps.