From: Brian Candler Date: 2003-07-09T07:59:07+09:00 Subject: Re: Integrations tests and $: On Wed, Jul 09, 2003 at 03:37:21AM +0900, Jim Freeze wrote: > Now, I have moved on to integration testing > and am testing ruby applications. The problem > is that when I execute the system call > to run the integration test, I lose the $:.unshift > results. > > In other words > > $:.unshift("../lib") > system("myapp") > > does not work since $: will not have "../lib". Solutions you can use: 1. Modify myapp so it knows where to find its libraries. e.g. it could contain require '/etc/myconf' where /etc/myconf.rb contains $:.unshift("/path/to/lib") 2. set RUBYLIB so the child process knows where to look for its libraries ENV["RUBYLIB"]="../lib" system("myapp") 3. since it's a Ruby program, you could run it in your existing Ruby interpreter: $:.unshift("../lib") load("myapp",true) Regards, Brian.