uninitialized constant Fileutils (NameError)?

T

Thomas Luedeke

I do not understand what is going on here - I've done this a multitude
of times and all of a sudden it doesn't work any more.

I've got a "require 'fileutils'" at the beginning of my script, but when
I use the file copy command "Fileutils.cp" it just keeps stopping with
the uninitialized constant error.

What potential problem is going on here? I'm using Ruby 1.9.
 
H

Haruka YAGNI

Hi, Thomas

I've got a "require 'fileutils'" at the beginning of my script, but when
I use the file copy command "Fileutils.cp" it just keeps stopping with
the uninitialized constant error.

Simple spell miss. The class name is "FileUtils" with an upper U, not
Fileutils.

Haruka YAGNI
 
S

Stefano Crocco

I do not understand what is going on here - I've done this a multitude
of times and all of a sudden it doesn't work any more.

I've got a "require 'fileutils'" at the beginning of my script, but when
I use the file copy command "Fileutils.cp" it just keeps stopping with
the uninitialized constant error.

What potential problem is going on here? I'm using Ruby 1.9.

It's FileUtils (note the capital U), not Fileutils.

Stefano
 

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

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top