jruby bash scripts do not work with msys/mingw
----------------------------------------------

                 Key: JRUBY-5864
                 URL: http://jira.codehaus.org/browse/JRUBY-5864
             Project: JRuby
          Issue Type: Bug
          Components: Launcher, Windows
    Affects Versions: JRuby 1.6.2
         Environment: Windows 7 running msys git
            Reporter: Ryan Bergman
            Assignee: Thomas E Enebo


I'm having an issue executing jruby from the mingw git bash shell in windows. I 
downloaded the windows installer for jruby 1.6.2 and ran it without issue. If I 
open a new windows cmd shell it seems to work fine. I installed the rake and 
sinatra gems; used the irb. entering jruby -v gets:

    jruby 1.6.2 (ruby-1.8.7-p330) (2011-05-23 e2ea975) (Java HotSpot(TM) Client 
VM 1.6.0_24) [Windows 7-x86-java]

However, when I open the git mingw bash shell and attempt to do anything with 
jruby I get this error:

    Exception in thread "main" java.lang.NoClassDefFoundError: org/jruby/Main
    Caused by: java.lang.ClassNotFoundException: org.jruby.Main
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    Could not find the main class: org.jruby.Main.  Program will exit.


I think the issue is the shell scripts that end  up invoking the jar in the 
jruby bin directory. 

The issue is that while msys can transform POSIX to Win paths for most things, 
but the script builds up strings on its own in order to pass classpath and 
other information to the jar.

It appears that this is where things are getting messed up. The scripts 
specifically have branches of code that deal with cygwin for this same reason. 
I attempted to force the scripts to to think that it was running under cygwin 
but unfortunately the scripts make use of the "cygpath" program to get the 
paths and that is not available in msys





--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to