If user's PATH contains '.' and 'jruby' resolves to './jruby', JRUBY_HOME is 
incorrectly set to '.', leading to 'NoClassDefFoundError'
--------------------------------------------------------------------------------------------------------------------------------------

                 Key: JRUBY-2699
                 URL: http://jira.codehaus.org/browse/JRUBY-2699
             Project: JRuby
          Issue Type: Bug
          Components: Application Error
    Affects Versions: JRuby 1.1.2
         Environment: OS X 10.5.3, Apple JDK 1.5, jruby r7022.
            Reporter: Hiro Asari
            Priority: Trivial


JRUBY_HOME is incorrectly set if PATH contains '.' and the user is in the 
directory jruby is in.  I'm not sure what the best solution is, but the 
following will do the job for now.


$ svn diff jruby
Index: jruby
===================================================================
--- jruby       (revision 7022)
+++ jruby       (working copy)
@@ -36,6 +36,9 @@
 
 JRUBY_HOME_1=`dirname "$PRG"`           # the ./bin dir
 JRUBY_HOME=`dirname "$JRUBY_HOME_1"`  # the . dir
+if [ $JRUBY_HOME = '.' ] ; then
+  JRUBY_HOME='..'
+fi
 
 if [ -z "$JRUBY_OPTS" ] ; then
   JRUBY_OPTS=""


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
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