Can't use FileUtils

R

Ralf Müller

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
 
G

gabriele renzi

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
 
R

Ralf Müller

Am Montag, 14. Juni 2004 16:13 schrieb gabriele renzi:
il Mon, 14 Jun 2004 23:07:34 +0900, Ralf Müller <[email protected]>

ha scritto::

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
 

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

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top