Uninitialized constant Fileutils (NameError)?

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.

···

--
Posted via http://www.ruby-forum.com/.

Hi, Thomas

···

On Thu, Apr 7, 2011 at 5:45 PM, Thomas Luedeke <tluedeke@excite.com> wrote:

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

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

Stefano

···

On Thursday 07 April 2011 17:45:43 Thomas Luedeke wrote:

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.