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
    automatically?

    Donglai
     
    Donglai Gong, Jun 27, 2003
    #1
    1. Advertising

  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

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

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Campbell

    RAA/RubyForge...

    Michael Campbell, Sep 12, 2003, in forum: Ruby
    Replies:
    1
    Views:
    105
    Hal Fulton
    Sep 12, 2003
  2. Simon Strandgaard

    RAA-stream implicit iterator maybe offbyone ?

    Simon Strandgaard, Sep 14, 2003, in forum: Ruby
    Replies:
    2
    Views:
    169
    Simon Strandgaard
    Sep 17, 2003
  3. Josef 'Jupp' Schugt

    rubyfilter@raa: Wrong URLs

    Josef 'Jupp' Schugt, Sep 18, 2003, in forum: Ruby
    Replies:
    0
    Views:
    112
    Josef 'Jupp' Schugt
    Sep 18, 2003
  4. NAKAMURA, Hiroshi

    [RAA] Jim Weirich's projects website

    NAKAMURA, Hiroshi, Dec 3, 2003, in forum: Ruby
    Replies:
    2
    Views:
    109
    NAKAMURA, Hiroshi
    Dec 4, 2003
  5. Simon Strandgaard

    RAA error - can't dup NilClass

    Simon Strandgaard, May 6, 2004, in forum: Ruby
    Replies:
    12
    Views:
    266
    Chad Fowler
    May 8, 2004
Loading...

Share This Page