I have to run ruby script on windows 7 (I know that it's bad idea). My script creates folders (if they is not exist) and copies files into them. I'm using FileUtils lib to perform this job, like:
FileUtils.mkdir_p(path)
FileUtils.cp_r(file.path, path)
FileUtils.touch(file)
On ubuntu and mac everything is ok, but on windows 7 machine I got next error:
Permission denied - ./program_folder/input/. (Errno::EACCES)
on this codeline:
Dir.entries('./program_folder/input').map { |file_name| File.new("./program_folder/input/#{file_name}") }.compact
Any ideas how can I fix it?
I have tried to run ruby and irb termianl with administrator access and tried to do FileUtils.chmod_R(0777, @path) on all paths but still no changes...