Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Can't use FileUtils

Reply
Thread Tools

Can't use FileUtils

 
 
Ralf Müller
Guest
Posts: n/a
 
      06-14-2004
Hi out there,

I'd like to use "FileUtils*", but ruby doe'nt agree:

irb(main):003:0> FileUtils.mkdir('uno')
NameError: uninitialized constant FileUtils
from (irb):3
irb(main):004:0>

But the file ist allreay in the lib:
ram@lilith:~/src/tar$locate fileutils.rb
/usr/local/lib/ruby/1.8/fileutils.rb

Dir works:
irb(main):001:0> Dir.mkdir('uno')
Errno::EEXIST: File exists - uno
from (irb):1:in `mkdir'
from (irb):1

I use ruby rby 1.8.2.

Where's my mistake?

regards
ralf



 
Reply With Quote
 
 
 
 
gabriele renzi
Guest
Posts: n/a
 
      06-14-2004
il Mon, 14 Jun 2004 23:07:34 +0900, Ralf Müller <(E-Mail Removed)>
ha scritto::

>Hi out there,
>
>I'd like to use "FileUtils*", but ruby doe'nt agree:
>
>irb(main):003:0> FileUtils.mkdir('uno')
>NameError: uninitialized constant FileUtils
> from (irb):3
>irb(main):004:0>
>
>But the file ist allreay in the lib:
>ram@lilith:~/src/tar$locate fileutils.rb
>/usr/local/lib/ruby/1.8/fileutils.rb


the 1.8 dir is there for you to require files. The builtin stuff like
Dir does not have extenrals files, so:
require 'filutils.rb'
FileUtils.mkdir_p domething
 
Reply With Quote
 
 
 
 
Ralf Müller
Guest
Posts: n/a
 
      06-14-2004
Am Montag, 14. Juni 2004 16:13 schrieb gabriele renzi:
> il Mon, 14 Jun 2004 23:07:34 +0900, Ralf Müller <(E-Mail Removed)>
>
> ha scritto::
> >Hi out there,
> >
> >I'd like to use "FileUtils*", but ruby doe'nt agree:
> >
> >irb(main):003:0> FileUtils.mkdir('uno')
> >NameError: uninitialized constant FileUtils
> > from (irb):3
> >irb(main):004:0>
> >
> >But the file ist allreay in the lib:
> >ram@lilith:~/src/tar$locate fileutils.rb
> >/usr/local/lib/ruby/1.8/fileutils.rb

>
> the 1.8 dir is there for you to require files. The builtin stuff like
> Dir does not have extenrals files, so:
> require 'filutils.rb'
> FileUtils.mkdir_p domething


Thanks (or "Vielen Dank"), Gabriele.
Works fine now.

bets regards
ralf




 
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
needed urgent "org.apache.io.FileUtils mahesh Java 1 12-07-2006 04:53 AM
FileUtils Bug in 1.8.0 Jim Freeze Ruby 0 04-22-2004 06:41 PM
Fileutils.cp bug? Chad Fowler Ruby 2 11-17-2003 03:41 PM
FileUtils - :preserve does not preserve mtime of directories on Windoze Grzegorz Chrupala Ruby 2 06-30-2003 07:38 AM



Advertisments