From: Stefano Crocco Date: 2008-06-04T00:54:42+09:00 Subject: Re: general query about ruby libraries On Tuesday 03 June 2008, Sandip Gangakhedkar wrote: > What about tarballs? Or zip files? > I am aware of RubyGems. However, lots of new and recent libraries, > especially the ones hosted on github are not yet available as gems. > > Thanks, > Sandip To know where ruby looks for files, you can look at the contents of the $: global variable in ruby: ruby -e 'puts $:' On my (gentoo linux) system, the output is: /usr/lib/ruby/site_ruby/1.8 /usr/lib/ruby/site_ruby/1.8/i686-linux /usr/lib/ruby/site_ruby /usr/lib/ruby/1.8 /usr/lib/ruby/1.8/i686-linux . On other systems, the output may vary. I think that the most correct place to put user-installed libraries is under the site_ruby/1.8 directory. An alternative could be to install them in any place you like and set the environment variable RUBYLIB to include that directory. For instance, if I decided to install some ruby libraries in /home/stefano/ruby_libraries, I should put the line (assuming a bash shell) export RUBYLIB=/home/stefano/ruby_libraries in my .bashrc file. At any rate, unless you have very good reasons to install the library in a custom place, I think you should use the site_ruby directory, as I said above. I hope this helps Stefano