From: Just Another Victim of the Ambient Morality Date: 2006-07-15T14:41:46+09:00 Subject: Re: Some questions about Ruby and it's environment... "Eric Hodel" wrote in message news:D50A04D4-B38E-433D-8C47-38AC2E67C079@segment7.net... > On Jul 14, 2006, at 6:55 PM, Just Another Victim of the Ambient Morality > wrote: > >> Is there anything I can do to get Ruby to find these "required" scripts? > > Ruby searches these paths: > > ruby -e 'p $LOAD_PATH' > > You can use the -I argument or the RUBYLIB environment variable to add > paths to this. You can also put your extra libraries in your site_ruby > directory. Thanks, I went with the environment variable. It's what I was looking for... >> I tried to call a PERL script from a Ruby script and that myseriously >> failed. I did a search on groups.google and found that you need to call >> the PERL interpreter, directly. I found this a little odd since PERL >> scripts have no problem calling other PERL scripts. It's not a problem >> of the environment, since Ruby can call executables in the execution >> path. > > I don't believe you. Please show us an error. > > $ cat x.pl > #!/usr/bin/env perl > > print "hi\n"; > > $ ruby -e 'system "./x.pl"' > hi Interestingly enough, I remember seeing this on the other post in this newsgroup. This is what this scenario looks like for me: $cat x.pl print "hi\n" $ruby -e 'puts `x.pl`' -e:1:in ``': Exec format error - x.pl (Errno::ENOEXEC) from -e:1 Of course, in DOS, the command line uses the ">" symbol but I didn't want to create any confusion with quoted text. Of course, the solution was to use the "system" method but, really, what's so different with the familiar `` operator? ...Yet you didn't know this nor did you use it in your example. This suggests to me that you don't use this operator anymore. Why not? The "system" call doesn't even return the output of the command nor does this output actually reach stdout...