[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Permission denied - . (Errno::EACCES) error

Max Russell

12/28/2007 4:13:00 PM

Dir.open('Logs') do |dir|
dir.each do |file|
puts file
File.open(file).each_line do |entry|
puts entry
if /Test Condition Passed/ =~ entry
passcount += 1
#puts "passcount reached"
elsif /Test Condition Failed/ =~ entry
failcount += 1
#puts "failcount reached"
end
end
end
end

the above piece of code when I run it from eclipse generates this error:

C:/workspace/CV_Auto/grapher.rb:10:in `initialize': Permission denied -
(Errno::EACCES)
from C:/workspace/CV_Auto/grapher.rb:10:in `open'
from C:/workspace/CV_Auto/grapher.rb:10
from C:/workspace/CV_Auto/grapher.rb:8:in `each'
from C:/workspace/CV_Auto/grapher.rb:8
from C:/workspace/CV_Auto/grapher.rb:7:in `open'
from C:/workspace/CV_Auto/grapher.rb:7

I'm perhaps being dim (not the first time), but can't see where I'm
going wrong?
--
Posted via http://www.ruby-....

1 Answer

Max Russell

12/28/2007 4:22:00 PM

0

think I've just answered my own question:

added some puts statements and then remembered this is a Subversion
aware directory, so the directory .svn is probably the one causing the
problem.
--
Posted via http://www.ruby-....