Using new FileFind

R

RichardOnRails

Hi,
I'm running Ruby version1.9.3 over WinXP/SP3.
I ran "K:\>gem install file-find" in a Window Command window.
In response, I got (among other things):
Successfully installed win32-api-1.4.8-x86-mingw32
Successfully installed windows-api-0.4.2
Successfully installed windows-pr-1.2.2
Successfully installed win32-security-0.1.3
Successfully installed sys-admin-1.5.6-x86-mingw32
Successfully installed file-find-0.3.5
6 gems installed
Using the rdoc/README.html at:
K:/_Utilities/Ruby_1.9.3_p194/lib/ruby/gems/1.9.1/doc/file-find-0.3.5/
Based on the README, I ran the following Ruby program:

# FileFindGem_Test.rb
# K:\___RubyTopApps\Search\Example_07_Gem_FileFind\FileFindGem_Test.rb

puts "Ruby version" + RUBY_VERSION
STDOUT.flush

require 'file/find'

rule = File::Find.new(
:pattern => "*.rb",
:follow => false,
:path => ['/usr/local/lib', '/opt/local/lib']
)

rule.find{ |f|
puts f
}

and got the following:
K:\>ruby K:\___RubyTopApps\Search\Example_07_Gem_FileFind\FileFindGem_Test.rb
Ruby version1.9.3
K:/_Utilities/Ruby_1.9.3_p194/lib/ruby/gems/1.9.1/gems/file-find-0.3.5/lib
/file /find.rb:229:in `open': no::ENOENT)
from K:/_Utilities/Ruby_1.9.3_p194/lib/ruby/gems/1.9.1/gems/file-find-0.3.5/lib/file/find.rb:229:in `foreach'
from K:/_Utilities/Ruby_1.9.3_p194/lib/ruby/gems/1.9.1/gems/file-find-0.3.5/lib/file/find.rb:229:in `block in find'
from K:/_Utilities/Ruby_1.9.3_p194/lib/ruby/gems/1.9.1/gems/file-find-0.3.5/lib/file/find.rb:227:in `each'
from K:/_Utilities/Ruby_1.9.3_p194/lib/ruby/gems/1.9.1/gems/file-find-0.3.5/lib/file/find.rb:227:in `find'
from FileFindGem_Test.rb:15:in `<main>'

I don't feel competent to debug FileFind. Anybody got any idea about what's wrong.

Thanks in Advance,
Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,928
Messages
2,570,068
Members
46,513
Latest member
JacklynMcC

Latest Threads

Top