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
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
···
il Mon, 14 Jun 2004 23:07:34 +0900, Ralf Müller <r_mueller@imp-ag.de> 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
Thanks (or "Vielen Dank"), Gabriele.
Works fine now.
bets regards
ralf
···
Am Montag, 14. Juni 2004 16:13 schrieb gabriele renzi:
il Mon, 14 Jun 2004 23:07:34 +0900, Ralf Müller <r_mueller@imp-ag.de> > > 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