============
:1: C:/Program Files/jruby-1.4.0/bin/JRuby:17: , unexpected kIN
(SyntaxError)
case "`uname`" in
^
===========
The script runs just fine with regular ruby. prior to a few
modifications it ran just fine with JRuby.
I googled and found some indication of an error like this, but it
appeared to be corrected in 1.4.0 (which I'm running)
I haven't been able to back out the changes to get it running again, so
I'm not really sure what triggers it.
Same problem earlier today, made a couple of minor changes and the
script was working agin.
very frustrating, I could really use the improved performance of JRuby.
--
Posted via http://www.ruby-forum.com/.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Any small test case that exposes this error would be appreciated.
You seems to be running under Cygwin? Try jruby.exe with exe extension
explicitly, that would execute the native binary, not the shell
script.
Thanks,
--Vladimir
I tried your suggestion of JRuby.exe and got the same results.
Vladimir Sizikov wrote:
> Hi Mike,
>
> Any small test case that exposes this error would be appreciated.
>
> You seems to be running under Cygwin? Try jruby.exe with exe extension
> explicitly, that would execute the native binary, not the shell
> script.
>
> Thanks,
> --Vladimir
>
> On Sat, Nov 28, 2009 at 3:34 AM, Mike Cargal <li...@ruby-forum.com>
> wrote:
>> The script runs just fine with regular ruby. prior to a few
>> script was working agin.
On Sat, Nov 28, 2009 at 1:47 PM, Mike Cargal <li...@ruby-forum.com> wrote:
> Thanks for the hint. If I can come up with a small script that breaks
> and what causes the break, I'll post it.
Thanks.
> I tried your suggestion of JRuby.exe and got the same results.
Hmm, this just can't be possible. :) The whole point of invoking
jruby.exe is to avoid running any jruby shell script.
Maybe, I've just misunderstood what you trying to do.
So, you have a ruby script, say, runme.rb and you'd like to run it?
And this is on Windows, right? Cygwin or not?
So, you do
jruby.exe runme.rb
and this produces the error?
Thanks,
--Vladimir
C:\.....>jRuby.exe assignZCats.rb
:1: C:/Program Files/jruby-1.4.0/bin/jRuby:17: , unexpected kIN (SyntaxError)
case "`uname`" in
^
I don't recall installing Cygwin.
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?
Thanks,
--Vladimir
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 Sun, Nov 29, 2009 at 2:49 PM, Mike Cargal <mi...@cargal.net> wrote:
> 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:
1. Use jruby , not jRuby in order to launch it.
2. This is a bug in jruby launcher, it should compare in case-insensitive mode.
Thanks,
--Vladimir
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.
Thanks for reporting it!
--Vladimir