The gems in the jar file should be picked up through a separate classpath search
--------------------------------------------------------------------------------

                 Key: JRUBY-5470
                 URL: http://jira.codehaus.org/browse/JRUBY-5470
             Project: JRuby
          Issue Type: Bug
          Components: Rails WAR Deployment
    Affects Versions: JRuby 1.5.6
            Reporter: Leandro Silva
            Priority: Minor


The gems in the jar file should be picked up through a separate classpath 
search, even if the gem jar isn't mentioned in Gem.path. But what happens is 
that we need to append each gem in the Ruby load path, just like this:

$LOAD_PATH.unshift 
"file:#{File.expand_path(File.dirname(FILE))}/lib/new_dream_gems.jar!/rack-1.2.1/lib"
 $LOAD_PATH.unshift 
"file:#{File.expand_path(File.dirname(FILE))}/lib/new_dream_gems.jar!/sinatra-1.1.2/lib"
 $LOAD_PATH.unshift 
"file:#{File.expand_path(File.dirname(FILE))}/lib/new_dream_gems.jar!/tilt-1.2.2/lib"

Otherwise, only these paths will be in the load path:

WEB-INF/lib/jruby-rack-1.0.5.jar!/vendor/rack-1.2.1
WEB-INF/lib/jruby-stdlib-1.5.6.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8
WEB-INF/lib/jruby-stdlib-1.5.6.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared
WEB-INF/lib/jruby-stdlib-1.5.6.jar!/META-INF/jruby.home/lib/ruby/1.8

So, I have these jar files in the WEB-INF/lib of my web application:

jruby-core-1.5.6.jar
jruby-rack-1.0.5.jar
jruby-stdlib-1.5.6.jar
new_dream_gems.jar

And finally, I've deployed this web application in jetty-7.3.0.v20110203.

Thanks a lot!

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