Ruby's require is case sensitive. Whether that's a good thing or not, it's
something to be aware of when requiring files. Require will load a file into
your ruby space once whether it's a ruby file or a dll or other binary
library, load is another method that will pull the file in everytime it's
called, and include is a way to pull in a namespace.
require 'watir' # <- pull in watir.rb
include Watir # <- add the Watir namespace defined in watir.rb as module
Watir
# so that now you can say ie = IE.new instead of
qualifying
# the module where IE lives -- Watir::IE
There are good descriptions of these basics in the Ruby pickaxe book:
http://www.rubycentral.com/book/tut_modules.html
and on the Ruby faq site:
http://www.rubycentral.com/faq/rubyfaq.html
-Charley
On 12/7/06, Avinash <[EMAIL PROTECTED]> wrote:
Thank you. That did it. Fixed the casing (require 'watir') and all is
well.
So why does the casing matter? While we are on this topic, what is the
difference between include and require?
--
Avinash
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5662&messageID=15840#15840
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general