# Re: about require

**URL:** <https://www.ruby-forum.com/t/re-about-require/73021>\
**Category:** Ruby\
**Created:** [October 20, 2006, 6:18pm UTC](https://www.ruby-forum.com/t/re-about-require/73021 "2006-10-20T18:18:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 20, 2006, 6:18pm UTC](https://www.ruby-forum.com/t/re-about-require/73021/1 "2006-10-20T18:18:31Z")

</div>

From: Li Chen

> In Ruby why do we wirte code as require ‘enumerator’, instead of  
> require ‘Enumerator’ with uppercase?

Because you are specifying the name of the file that the Enumerator  
class is in, not the class itself.

> What happens if ‘enumerator’ is not  
> saved in the default path that Ruby usually looks for?

Then you get an error:  
LoadError: no such file to load – enumerator

---

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 20, 2006, 6:38pm UTC](https://www.ruby-forum.com/t/re-about-require/73021/2 "2006-10-20T18:38:54Z")

</div>

> > In Ruby why do we wirte code as require ‘enumerator’, instead of  
> > require ‘Enumerator’ with uppercase?
> 
> Because you are specifying the name of the file that the Enumerator  
> class is in, not the class itself.
> 
> > What happens if ‘enumerator’ is not  
> > saved in the default path that Ruby usually looks for?
> 
> Then you get an error:  
> LoadError: no such file to load – enumerator

Where is the default path that Ruby looks for? What if I want to ask  
Ruby also looks for another path? And in what format,with rb extension?

Thanks,

Li
