jruby/jruby-rack — Issue #75: Can't find some gems in LOAD_PATH, causing a no such file to load -- active_support/deprecation error
Author: moger777
Created: 2011-12-06 19:42:22+00:00
State: open

When using jruby-rack (the one included with warbler, jruby) I get the following issues:

[12/6/11 13:21:11:793 EST] 0000000a webapp I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0296E: [our_ear#our_project.war][/cr][Servlet.LOG]:.unable to create shared application instance:.org.jruby.rack.RackInitializationException: no such file to load -- active_support/deprecation
from /usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/railties-3.0.10/lib/rails/configuration.rb:1:in `(root)'
from org/jruby/RubyKernel.java:1038:in `require'
from /usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/railties-3.0.10/lib/rails/configuration.rb:2:in `(root)'
from org/jruby/RubyKernel.java:1038:in `require'
from /usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/railties-3.0.10/lib/rails/railtie.rb:8:in `(root)'
from org/jruby/RubyKernel.java:1038:in `require'
from classpath:/jruby/rack/rails/railtie.rb:166:in `load_environment'
from classpath:/jruby/rack/rails.rb:172:in `to_app'
from classpath:/jruby/rack/rails.rb:192:in `new'
from :1:in `(root)'
from org/jruby/RubyKernel.java:2062:in `instance_eval'
from classpath:/vendor/rack-1.3.5/rack/builder.rb:51:in `initialize'
from :1:in `(root)'

at org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:206)
at org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:56)
at org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:27)
at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:45)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1707)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:380)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:299)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:100)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:166)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:731)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:616)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:376)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:668)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1122)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1319)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:610)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:944)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:725)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2046)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:439)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:382)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$300(CompositionUnitMgrImpl.java:110)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:949)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
Caused by: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- active_support/deprecation

According to the logs we have the following jruby-rack config:
--- JRuby-Rack Config
compat_version =
filter_adds_html = true
filter_verifies_resource = false
ignore_environment = false
initial_runtimes = 1
jms_connection_factory =
jms_jndi_properties =
logger = org.jruby.rack.logging.ServletContextLogger@ed30ed3
logger_class_name = servlet_context
logger_name = jruby.rack
maximum_runtimes = 1
memory_buffer_size = 8192
num_initializer_threads =
rackup =
rackup_path =
rewindable = true
runtime_arguments =
runtime_timeout_seconds =
serial_initialization = false
servlet_context = com.ibm.wsspi.webcontainer.facade.ServletContextFacade@29432943

And the following loadpath:

--- $LOAD_PATH:
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/will_paginate-3.0.2/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/warbler-1.3.3/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/rubyzip-0.9.5/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/ruby-net-ldap-0.0.4/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/rails-3.0.10/lib
/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/railties-3.0.10/lib
/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/thor-0.14.6/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/rdoc-3.11/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/quartz-jruby-0.1.1/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/net-ldap-0.2.2/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/log4r-1.1.9/lib
/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/linguistics-1.0.9/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/kramdown-0.13.3/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/json-1.6.1-java/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/jruby-rack-1.1.1/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/jruby-openssl-0.7.4/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/jruby-jars-1.6.5/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/bundler-1.0.21/lib
/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/bouncy-castle-java-1.5.0146.1/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/activeresource-3.0.10/lib
/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/activerecord-oracle_enhanced-adapter-1.4.0/lib
/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.2.0/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/activerecord-3.0.10/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/arel-2.0.10/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/actionmailer-3.0.10/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/mail-2.2.19/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/treetop-1.4.10/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/polyglot-0.3.2/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/mime-types-1.17.2/lib
/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/actionpack-3.0.10/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/tzinfo-0.3.30/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/rack-test-0.5.7/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/rack-mount-0.6.14/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/rack-1.2.4/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/erubis-2.6.6/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/activemodel-3.0.10/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/i18n-0.5.0/lib
/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/builder-2.1.2/lib
file:/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/activesupport-3.0.10/lib
/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/abstract-1.0.0/lib
/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/rake-0.9.2/lib
classpath:/vendor/rack-1.3.5
/usr/WebSphere/AppServer70/profiles/AppSrv01/installedApps/our_server/our_ear.ear/our_project.war/WEB-INF/gems/gems/bundler-1.0.21/lib
/tmp/lib/ruby/site_ruby/1.8
/tmp/lib/ruby/site_ruby/shared
/tmp/lib/ruby/1.8

I am using Websphere with rails 3.0.10 and jruby 1.6.5.