From: Terry Poulin Date: 2007-08-30T04:09:35+09:00 Subject: Re: rake + FileUtils == warining Ronald Fischer wrote: >> Ronald Fischer wrote: >> > When I require both rake and FileUtils, i.e. >> > >> > require 'rake' # for String#ext >> > require 'FileUtils' >> > >> > I get the following warnings: >> > >> > c:/ruby186/lib/ruby/1.8/FileUtils.rb:93: warning: already >> initialized >> > constant OPT_TABLE > > [snip] > >> Are you sure you don't want to require 'fileutils' rather than >> 'FileUtils'? > > Indeed, I needed to write it as 'fileutils' and the error disappears. > > Now I wonder why I never got an error before in my application > (I had always required 'FileUtils' before, but got an error only > when I also started to use rake. It seems that Ruby had at least > included *something* when I asked for FileUtils..... > > -- > Ronald Fischer > Phone: +49-89-452133-162 > > > The file to be required is /lib/ruby/1.8/fileutils.rb which implements the module FileUtils. require 'filetuils' => correct, embeds fileutils.rb into current file include FileUtils => correct, mixes in methods from FileUtils module into current class/module. At least, thats how I learned it.... I'm no Ruby professional so don't quote me. TerryP. -- Email and shopping with the feelgood factor! 55% of income to good causes. http://www.ippimail.com