Running rake test from jruby-complete.jar?

Is anyone running rake test using jruby-complete?

Running with jruby install works fine like this:
c:\jruby\jruby-1.4.0\bin\jruby -S rake test

However, running with jruby-complete like this:
java -jar c:\projects\History\build\jruby-complete-1.4.0.jar -S rake
test

yields an error:

file:/C:/projects/History/build/jruby-complete-1.4.0.jar!/META-INF/jruby.home/bin/jruby.exe
-I"lib;test" “C:/projects/X/SVNROOT/jruby/gems/rake-0.8.7/lib/
rake/rake_test_loader.rb” “test/unit/user_test.rb” <…>

The filename, directory name, or volume label syntax is incorrect.

Looks like something is “hardcoded” to look for jruby.exe

On Mon, Feb 1, 2010 at 8:02 AM, Homer S. [email protected]
wrote:

file:/C:/projects/History/build/jruby-complete-1.4.0.jar!/META-INF/jruby.home/bin/jruby.exe
-I"lib;test" “C:/projects/X/SVNROOT/jruby/gems/rake-0.8.7/lib/
rake/rake_test_loader.rb” “test/unit/user_test.rb” <…>

The filename, directory name, or volume label syntax is incorrect.

Looks like something is “hardcoded” to look for jruby.exe

Wow, yeah, that’s really weird. First of all, file a bug for this. I
imagine we’re giving that executable name to Rake as the command to
run when shelling out, and not detecting that it’s trying to run jruby
(which would normally just spawn another JRuby instance in the same
JVM). It’s possible that our “in-process” launching is basically being
defeated by .exe in general.

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

OK - Where should I file the bug?

Charles Nutter wrote:

Wow, yeah, that’s really weird. First of all, file a bug for this. I
imagine we’re giving that executable name to Rake as the command to
run when shelling out, and not detecting that it’s trying to run jruby
(which would normally just spawn another JRuby instance in the same
JVM). It’s possible that our “in-process” launching is basically being
defeated by .exe in general.

  • Charlie

Link to the JRuby JIRA:

http://jira.codehaus.org/browse/JRUBY

Hi Homer,

I think I’ve already fixed similar issue for ‘rake spec’ failing when
running from jruby-complete.jar

Please take a look at: http://jira.codehaus.org/browse/JRUBY-4238

So the fix should be already in the master branch. Could you please
try the latest build and check, that would be much appreciated.

You could either clone the JRuby repo and then do ‘ant jar-complete’
to build the jruby-complete.jar. Or, you might just get the latest
bits from http://ci.jruby.org/snapshots/ (which would be even
simpler).

Thanks,
–Vladimir

On Mon, Feb 1, 2010 at 9:54 PM, Homer S. [email protected]
wrote:


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Bug filed. Thanks!

Ikai L. wrote:

Link to the JRuby JIRA:

http://jira.codehaus.org/browse/JRUBY

I tested with the jar file from http://ci.jruby.org/snapshots/ and I get
the same error. I noted this here:
http://jira.codehaus.org/browse/JRUBY-4530

Vladimir S. wrote:

Hi Homer,

I think I’ve already fixed similar issue for ‘rake spec’ failing when
running from jruby-complete.jar

Please take a look at: http://jira.codehaus.org/browse/JRUBY-4238

So the fix should be already in the master branch. Could you please
try the latest build and check, that would be much appreciated.

You could either clone the JRuby repo and then do ‘ant jar-complete’
to build the jruby-complete.jar. Or, you might just get the latest
bits from http://ci.jruby.org/snapshots/ (which would be even
simpler).

Thanks,
–Vladimir

Hi,

OK, can reproduce the problem with the latest JRuby from master branch.

The problem is that Rake on Windows uses a rather weird way to launch
ruby to execute tests, specifically: “call path_to_ruby …”. In this
special case, when the first entry is ‘call’, JRuby’s in-process
launching magic doesn’t work, since it works only when the first
parameter is some kind of ruby, not ‘call’.

Not sure how to proceed here. We probably could hack-up some solution
to add ‘call’ case to in-process detection magic, but this feels
really hacky solution… Any opinions?

Alternatively, one could submit some patch to Rake itself, but again,
not clear what that could be. Running rake in such a weird envirenment
like from within jruby-complete.jar on Windows won’t probably be
significant enough to change Rake…

The only workaround on Windows at the moment is to use proper JRuby,
not jruby-complete.jar…

Any suggestions are welcome!

The code in question is in Rake’s lib/rake/alt_system.rb, method
repair_command().

Thanks,
–Vladimir

On Mon, Feb 1, 2010 at 10:37 PM, Homer S. [email protected]
wrote:

Please take a look at: http://jira.codehaus.org/browse/JRUBY-4238
–Vladimir

Posted via http://www.ruby-forum.com/.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email