Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Using new FileFind

Reply
Thread Tools

Using new FileFind

 
 
RichardOnRails
Guest
Posts: n/a
 
      07-26-2012
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\F ileFindGem_Test.rb

puts "Ruby version" + RUBY_VERSION
STDOUT.flush

require 'file/find'

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

rule.find{ |f|
puts f
}

and got the following:
K:\>ruby K:\___RubyTopApps\Search\Example_07_Gem_FileFind\F ileFindGem_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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript new-new-new-new-newbee weblinkunlimited@gmail.com Javascript 2 03-11-2008 01:15 AM
2008 new year,2008 new business, 2008 new life, much cheap andbeautiful product will help you yhnetstore@gmail.com Digital Photography 0 01-07-2008 04:57 PM
Using new foo where foo is a new Foo object. blackholebutterfly@gmail.com Javascript 4 12-23-2007 10:45 PM
Reframing a given page in a new frameset using javascript -- frames[0] goes to new location, but can't remember it? Weston Javascript 1 08-10-2007 08:34 PM
New computer, New OS, New Wireless Problem :-\ =?Utf-8?B?RGFu?= Wireless Networking 3 07-31-2005 02:11 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57