Require without .rb

How can I make my programs not need to be called *.rb in the require statment? If I have a script called notepad/component.rb, how do make it so that notepad.rb can say require "notepad/component" instead of "notepad/component.rb"?

Thank you

···

---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.

have you tried it? (pls post your sample code)

kind regards -botp

···

On Jan 9, 2008 9:45 PM, MistryMan4000@Yahoo.com <mistryman4000@yahoo.com> wrote:

How can I make my programs not need to be called *.rb in the require
statment? If I have a script called notepad/component.rb, how do make
it so that notepad.rb can say require "notepad/component" instead of
"notepad/component.rb"?

MistryMan4000@Yahoo.com wrote:

How can I make my programs not need to be called *.rb in the require
statment? If I have a script called notepad/component.rb, how do make it
so that notepad.rb can say require "notepad/component" instead of
"notepad/component.rb"?

Thank you

Hi
You do not need to put the .rb in require.
Try a simple command:
require "dbi" and see the result.

···

--
Posted via http://www.ruby-forum.com/\.