From: Julian Leviston Date: 2009-02-03T11:29:50+09:00 Subject: Re: Problem with ruby classes Make sure you don't include the extension Sent from my iPhone On 03/02/2009, at 3:33 AM, Manisha Tripathy wrote: > Stefano Crocco wrote: >> Alle Monday 02 February 2009, Manisha Tripathy ha scritto: >>> >>> >>> #file2.rb >>> object = File1.new >>> class File2 >>> end >>> >>> >>> The error while running file2.rb is >>> >>> file2.rb:3: uninitialized constant File1 (NameError) >> >> Add >> >> require 'file1' >> >> somewhere before the call to File1.new in file2.rb >> >> Stefano > > Thanks Stefano !!! > I have already tried to use require but of no use.It says no file to > load, where as both the files are in the same directory > -- > Posted via http://www.ruby-forum.com/. >