2010/2/2 Alpha Blue <jdezenzio / gmail.com>:
> Robert Klemme wrote:
>>
>> "require" is for loading library code (libs as parts of the
>> installation, self written libs as well as gems).
>>
>> "load" is for explicitly forcing a file load and execution at a define
>> place in the source code.
>
> Thanks for the clarification Robert and I like your distinction because
> it makes more sense to me.      > require and load statements correctly then. The only thing I've been
> doing with regard to load statements is defining an absolute load path
> rather than a relative load path.     > loading of an xml source file (xrc) by wx_sugar.

Ah, OK.  Then of course load is more appropriate.

> This is strange because I don't know why I never thought about doing
> this with Ruby.  §       > therefore, I tend to keep the libs separate.  > defining a libs dir for reusable library classes that I require in
> future projects.        > the code I need.      > time of processing.  §  褺     > directories are being set properly and included, but I can definitely
> see this being a better way of implementing things later on.   > privatize and store all my libs on github for safekeeping and rdoc
> everything for my own benefit.

Well, you can even have a mix of both: you can set RUBYLIB to your
"shared libs" folder and then in every main executable add an
appropriate folder of your local project.  And we're back to the
original question IIRC. :-)  If you have to do that on multiple
machines though then it might be reasonable to use gems for
distribution and use the gems mechanism as storage for the shared
libs. But the principle would be the same.

>> Hope that helps.

> It does - my thanks!

You're welcome!

Cheers

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/