Do you have any system(), exec() or backtick `` calls in
your script?
No
but
in that script you’re trying to launch another jruby process. Is that
possible?
The only thing I’m doing close to this is using require for Ruby
modules in the same directory. But, since everything works just fine
if I call the jruby.exe by its full path name, that would not seem to
explain it. I also have other scripts in the same directory doing the
same thing that run fine when executed by jruby (no .exe)
It’s very strange. I’m managing to get my work done, but certainly
can’t understand how the shell script gets invoked sometimes.
On Nov 29, 2009, at 3:22 AM, Vladimir S. wrote:
I tried your suggestion of JRuby.exe and got the same results.
I’m really puzzled by this. The only logical explanation I see is that
the actual assignZCats.rb file is being executed by jruby.exe, but
in that script you’re trying to launch another jruby process. Is that
possible? Do you have any system(), exec() or backtick `` calls in
your script?
It’s very strange. I’m managing to get my work done, but certainly
can’t understand how the shell script gets invoked sometimes.
I finally got it!!!
You seem to be invoking jruby.exe with command like ‘jRuby’, right?
And jruby.exe doesn’t like it, since we have some magic in it to look
into its own name and do some tricks.
Like, for example you could copy jruby.exe to rake.exe, and then this
launcher will look into its name, notice that it is not jruby anymore
and then launch: jruby -S rake.
In your case it sees jRuby, it doesn’t realize that jRuby is equal to
jruby, and launches jruby -S jRuby, finds the shell scripts and gets
very confused, confusing us along the way.
In short:
Use jruby , not jRuby in order to launch it.
This is a bug in jruby launcher, it should compare in
case-insensitive mode.
The bug report for your problem is here: http://jira.codehaus.org/browse/JRUBY-4288
I’ve just fixed it in jruby-launcher workspace, and it should
eventually end up in JRuby 1.5 as well.