Using new FileFind

Discussion in 'Ruby' started by RichardOnRails, Jul 26, 2012.

  1. 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:
    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

    require 'file/find'

    rule =
    :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
    /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,
    RichardOnRails, Jul 26, 2012
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.
Similar Threads
There are no similar threads yet.