require's load order is incorrect, leads to problems with gems
--------------------------------------------------------------

                 Key: JRUBY-1713
                 URL: http://jira.codehaus.org/browse/JRUBY-1713
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.x
         Environment: Latest JRuby 1.1b1 from trunk
            Reporter: Vladimir Sizikov
            Assignee: Thomas E Enebo
            Priority: Critical


It seems that require's load order is incorrect and leads to very confusing 
errors when gem is used.

For example, let's  say I have a thread.rb file in the current directory, with 
the following content:
puts "IN CUSTOM THREAD LIBRARY"

And then I invoke:
ruby -e "require 'thread'".

In this case no output is produced, since Ruby 1.8.6 , Ruby 1.9 and Rubinius 
loads the standard thread library.

In JRuby's case:
jruby -e "require 'thread'" ==>
IN CUSTOM THREAD LIBRARY

That means that in JRuby local file takes precenece over the system file, and 
this leads to problems running gem, for example.
Try to run gem command from the directory that contains custom thread.rb, and 
you'll get exceptions due to fact that local library was loaded and gem needs 
the system one.



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