where to put private/raa libraries?

D

Donglai Gong

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
 
B

Bermejo, Rodrigo

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top