where to put private/raa libraries?

Discussion in 'Ruby' started by Donglai Gong, Jun 27, 2003.

  1. Donglai Gong

    Donglai Gong Guest

    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

    Donglai Gong, Jun 27, 2003
    1. Advertisements

  2. 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
    Bermejo, Rodrigo, Jun 27, 2003
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.