From: Stefano Crocco Date: 2007-03-15T20:54:37+09:00 Subject: Re: Use as Lib Alle gioved� 15 marzo 2007, Farrel Lifson ha scritto: > On 15/03/07, Purandhar sairam Mannidi wrote: > > How can I use a specific directory as the lib along with ruby library > > files???? > > can Any one reply me with class name or module name? > > > > -- > > Posted via http://www.ruby-forum.com/. > > If you'd like to include a directory into the path ruby searches for > files you can use the -I command line prompt. So to add a directory > called 'lib' you'd write > ruby -Ilib program.rb > > Farrel Or you can manipulate the $: variable from within ruby. It's an array which contains the paths ruby uses when looking for required files. So, if you do $: << 'my_lib' you can require a file contained in the directory my_lib with require 'my_file' instead of using require 'my_lib/my_file' I hope this helps Stefano