Cannot load files from with JARS but only on some machines
----------------------------------------------------------

                 Key: JRUBY-5749
                 URL: http://jira.codehaus.org/browse/JRUBY-5749
             Project: JRuby
          Issue Type: Bug
         Environment: Inconsistent
            Reporter: Luke Galea
            Assignee: Thomas E Enebo


I've run into an inconsistent problem loading files/resources from within a jar 
once packaged.

For instance, on some machines I can do:
File.read(File.join( File.dirname(__FILE__), "..", "blah", "blah.txt" )) 
and on others that fails. Further problems arise just requiring other ruby 
files within the launcher in an executable jar.

I've created a repo on github that reproduces the problem. 
https://github.com/lukegalea/jrubyjarproblem

When it works it outputs "BLAH BLAH" and is fine on *some* OSX machines.
Where it doesn't work, it can't even load the ruby file wtf.rb and outputs 
something along the lines of (windows output here):

ire.rb:31:in `require': no such file to load -- wtf (LoadError)
        from file:/C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/jruby4899894134196687294ex
tract/jruby-stdlib-1.5.6.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygem
s/custom_require.rb:31:in `require'
        from bin/launcher.rb:1:in `load'
        from file:/C:/Documents%20and%20Settings/Administrator/Desktop/jrubyjarp
roblem.jar!/META-INF/main.rb:1
        from file:/C:/Documents%20and%20Settings/Administrator/Desktop/jrubyjarp
roblem.jar!/META-INF/main.rb:31:in `require'
        from file:/C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/jruby4899894134196687294ex
tract/jruby-stdlib-1.5.6.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygem
s/custom_require.rb:31:in `require'
        from <script>:3

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