Forum: Ruby on Rails rubystandard library question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
James B. Byrne (Guest)
on 2006-02-03 21:11
(Received via mailing list)
I have a problem getting find.rb and fileutils.rb to coexist in the
same script.  When I require both I get the following:

/usr/lib/ruby/1.8/find.rb:36:in `dup': can't dup NilClass
(TypeError)
        from /usr/lib/ruby/1.8/find.rb:36:in `find'
        from /usr/lib/ruby/1.8/find.rb:36:in `find'

I googled for this problem and did not come across any place (in
English at least) that covered it.  I am still ploughing through
the tutorials on Ruby and Rails and, given the extraordinarily high
amount of traffic on the ruby list, was wondering if anyone here
could tell me what I am doing wrong.  Do I have to provide a
namespace? How?

Regards,
Jim

--
     *** e-mail is not a secure channel ***
mailto:byrnejb.<token>@harte-lyne.ca
James B. Byrne                Harte & Lyne Limited
vox: +1 905 561 1241          9 Brockley Drive
fax: +1 905 561 0757          Hamilton, Ontario
<token> = hal                 Canada L8E 3C3
Eric H. (Guest)
on 2006-02-03 23:45
(Received via mailing list)
On Feb 3, 2006, at 11:08 AM, James B. Byrne wrote:

> I have a problem getting find.rb and fileutils.rb to coexist in the
> same script.

That should not be a problem.  Likely you are doing something wrong.

> When I require both I get the following:
>
> /usr/lib/ruby/1.8/find.rb:36:in `dup': can't dup NilClass
> (TypeError)
>         from /usr/lib/ruby/1.8/find.rb:36:in `find'
>         from /usr/lib/ruby/1.8/find.rb:36:in `find'

If you don't pass a nil value into Find::find you won't have this error.

What is the full backtrace including a small script to illustrate the
problem.

--
Eric H. - removed_email_address@domain.invalid - http://segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com
This topic is locked and can not be replied to.