Topic: Difference between include, require and load??

I have totally confused myself about the relationship between 'require' and
'include'. What is included must be already loaded by require.  So why
include at all?

Re: Difference between include, require and load??

The "include" statement is for including a module into a class:

module Bar
end

class Foo
  include Bar
end


The "require" statement loads a ruby file.

Just loading a file does not include it into a class, so that's why you need include as well.

Railscasts - Free Ruby on Rails Screencasts