I have two issues in Ruby which are bugging me.
On my (MS Windows) system, I have a couple of programs to help me
my electronic life and some of them are written in Ruby (are they still
called “programs” or are they “scripts?”). I keep all these programs in
directory and have an execution path to them.
I also have some patterns that come up time and time again in my
code so I have factored them out into their own files so I may “require”
them in any of my Ruby scripts.
The problem is that Ruby can’t find them. I had hoped that Ruby
search for “required” files in the directory of the running script but
doesn’t appear to be the case. I could have used the magic “$0”
but then I’d have to operate on it before using it. I also considered
refactoring this work and using that but…
Is there anything I can do to get Ruby to find these “required”
My second issue is not very serious but a curiosity to me. I used
use PERL so some of my useful “programs” are still written in that
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
PERL interpreter, directly. I found this a little odd since PERL
have no problem calling other PERL scripts. It’s not a problem of the
environment, since Ruby can call executables in the execution path.
So, what’s up with that? Why isn’t the Ruby interpreter like PERL
Thank you for your help!