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
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
On Jan 9, 2008 9:45 PM, [email protected]
[email protected] 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”?
have you tried it? (pls post your sample code)
kind regards -botp
[email protected] 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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs