From: Joel VanderWerf Date: 2006-08-25T03:20:56+09:00 Subject: Re: Ruby search Henry Savr wrote: > I want to manage the way how Ruby searches modules to load. I found, > that the $: variable is in charge, but it is read-only. Then I found > that RUBYLIB can be used to add directories. The _variable_ is read only, but the _object_ that it refers to (an array of strings) is not frozen. You can modify the object: irb(main):001:0> $: = 5 NameError: $: is a read-only variable from (irb):1 irb(main):002:0> $:.unshift "." => [".", "/usr/local/lib/ruby/site_ruby/1.8", "/usr/local/lib/ruby/site_ruby/1.8/i686-linux", "/usr/local/lib/ruby/site_ruby", "/usr/local/lib/ruby/1.8", "/usr/local/lib/ruby/1.8/i686-linux", "."] Or you can use RUBYLIB to set $: for newly started ruby processes. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407