ENV[PATH] variable not properbly set on windows
-----------------------------------------------

                 Key: JRUBY-3598
                 URL: http://jira.codehaus.org/browse/JRUBY-3598
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules, Java Integration, Windows
    Affects Versions: JRuby 1.2
         Environment: Windows XP SP3 ( German )
            Reporter: Heusinger Jakob


When trying to use "jruby -S warble war" i get the following error:

     [exec] private method `split' called for nil:NilClass
     [exec] 
Q:/app/codehaus/jruby_1_2_0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/repaired_system.rb:109:in
 `find_runnable'
     [exec] (See full trace by running task with --trace)

According source line: "[nil, ".", *ENV["PATH"].split(";")].each { |path| ..."

After some research i found out whats the problem:
JRuby cant access ENV[PATH] ( its nil ), the problem is that Windows names the 
Variable as "Path" instead of  "PATH"

I found out that "original" ruby ignore cases when accsessing the "ENV[PATH]" 
variable
Q:\>ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

Q:\>irb
irb(main):001:0> puts ENV['PATH']
c:\Programme\ruby\bin;C:\Programme\Windows Resource 
Kits\Tools\;C:\Programme\IBM\WebSphere 
MQ\Java\lib;C:\ora\o1020\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\IDM
 Computer Solutions\UEStudio '06;C:\Programme\IBM\WebSphere 
MQ\bin;C:\Programme\IBM\WebSphere MQ\tools\c\samples\bin;C:\Programme\CollabNet 
Subversion;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\strawberry\c\bin;C:\strawberry\perl\bin;C:\Programme\TortoiseSVN\bin;C:\Programme\MySQL\MySQL
 Server 
5.1\bin;C:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\Programme\JRuby\bin;C:\Programme\IDM
 Computer Solutions\UEStudio 
'06\;c:\Programme\cygwin;Q:\app\sun\jdk_1_6_0_13\bin\;
=> nil

When using jruby instead with the same commands i get the following output:
Q:\>jruby -v
jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-03-16 rev 9419) [x86-java]

Q:\>jruby -S irb
irb(main):001:0> puts ENV['PATH']
nil
=> nil
irb(main):002:0> puts ENV['Path']
c:\Programme\ruby\bin;C:\Programme\Windows Resource 
Kits\Tools\;C:\Programme\IBM\WebSphere 
MQ\Java\lib;C:\ora\o1020\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\IDM
 Computer Solutions\UEStudio '06;C:\Programme\IBM\WebSphere 
MQ\bin;C:\Programme\IBM\WebSphere MQ\tools\c\samples\bin;C:\Programme\CollabNet 
Subversion;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\strawberry\c\bin;C:\strawberry\perl\bin;C:\Programme\TortoiseSVN\bin;C:\Programme\MySQL\MySQL
 Server 
5.1\bin;C:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\Programme\JRuby\bin;C:\Programme\IDM
 Computer Solutions\UEStudio 
'06\;c:\Programme\cygwin;Q:\app\sun\jdk_1_6_0_13\bin\;
=> nil

A fix would be to just ignore case when accessing path as done in "original" 
ruby

-- 
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