Where to put private/raa libraries?

How does ruby looks up a class/module when you use ‘require’? Does it
use any system environment variables? For example can I put my
classes/modules in /usr/local/lib/ruby/mylibs and expect ruby to see it
automatically?

Donglai

Your require path is the current directory, the $RUBYLIB (on your ENV)
or ruby -e ‘print $:’ ,
anything inside this folders will be ‘required’ without specifying the
complete path name

so you can …try it.
export RUBYLIB=/usr/local/lib/ruby/mylibs:$RUBYLIB

Donglai Gong wrote:

···

How does ruby looks up a class/module when you use ‘require’? Does it
use any system environment variables? For example can I put my
classes/modules in /usr/local/lib/ruby/mylibs and expect ruby to see
it automatically?

Donglai