# Difference between "require VS include"

**URL:** <https://www.ruby-forum.com/t/difference-between-require-vs-include/148608>\
**Category:** Rails\
**Created:** [September 15, 2008, 3:58pm UTC](https://www.ruby-forum.com/t/difference-between-require-vs-include/148608 "2008-09-15T15:58:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![palani](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed655f/32.png) [@palani](https://www.ruby-forum.com/u/palani)\
**Post date:** [September 15, 2008, 3:58pm UTC](https://www.ruby-forum.com/t/difference-between-require-vs-include/148608/1 "2008-09-15T15:58:59Z")

</div>

Hi,  
Can any one please tell me the difference between require statement  
and include statement in Rails application…please

---

<div class="post-metadata">

**Author:** ![palani](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed655f/32.png) [@palani](https://www.ruby-forum.com/u/palani)\
**Post date:** [September 15, 2008, 4:15pm UTC](https://www.ruby-forum.com/t/difference-between-require-vs-include/148608/2 "2008-09-15T16:15:16Z")

</div>

On 15 Sep 2008, at 14:58, Palani K. wrote:

> Hi,  
> Can any one please tell me the difference between require statement  
> and include statement in Rails application…please

They’re basically completely different. require means ‘go and load  
this file’. include means ‘include this module in the current module/  
class/whatever’. For example in the context of a class this will add  
the constants and methods from the module to the class in question.

Fred

---

<div class="post-metadata">

**Author:** ![palani](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed655f/32.png) [@palani](https://www.ruby-forum.com/u/palani)\
**Post date:** [September 15, 2008, 4:17pm UTC](https://www.ruby-forum.com/t/difference-between-require-vs-include/148608/3 "2008-09-15T16:17:35Z")

</div>

Frederick C. wrote:

> On 15 Sep 2008, at 14:58, Palani K. wrote:
> 
> > Hi,  
> > Can any one please tell me the difference between require statement  
> > and include statement in Rails application…please
> 
> They’re basically completely different. require means ‘go and load  
> this file’. include means ‘include this module in the current module/  
> class/whatever’. For example in the context of a class this will add  
> the constants and methods from the module to the class in question.
> 
> Fred

```
       Thank you so much Fred Thanks
```
