jruby/jruby-rack — Issue #76: NoMethodError: relative_url_root when deploying Rails 3.1.1 app on Tomcat 7
Author: celsodantas
Created: 2011-12-15 22:20:30+00:00
State: open

The following error rises when access any controller is accessed when deployed in Tomcat 7:

Grave: Application Error
org.jruby.rack.RackInitializationException: undefined method `relative_url_root=' for ActionController::Base:Class
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/gems/gems/actionpack-3.1.1/lib/action_controller/railtie.rb:37:in `Railtie'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/gems/gems/activesupport-3.1.1/lib/active_support/ordered_hash.rb:162:in `each'
from org/jruby/RubyArray.java:1612:in `each'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/gems/gems/activesupport-3.1.1/lib/active_support/ordered_hash.rb:162:in `each'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/gems/gems/actionpack-3.1.1/lib/action_controller/railtie.rb:37:in `Railtie'
from org/jruby/RubyKernel.java:2062:in `instance_eval'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/gems/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/gems/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:43:in `run_load_hooks'
from org/jruby/RubyArray.java:1612:in `each'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/gems/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/gems/gems/actionpack-3.1.1/lib/action_controller/base.rb:234:in `Base'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/gems/gems/actionpack-3.1.1/lib/action_controller/base.rb:171:in `ActionController'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/gems/gems/actionpack-3.1.1/lib/action_controller/base.rb:3:in `(root)'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/gems/gems/actionpack-3.1.1/lib/action_controller/base.rb:48:in `Railtie'
from org/jruby/RubyKernel.java:2079:in `instance_exec'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/gems/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `run'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/gems/gems/railties-3.1.1/lib/rails/initializable.rb:55:in `run_initializers'
from org/jruby/RubyArray.java:1612:in `each'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/gems/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `run_initializers'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/gems/gems/railties-3.1.1/lib/rails/application.rb:96:in `initialize!'
from org/jruby/RubyKernel.java:2093:in `send'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/gems/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/config/environment.rb:5:in `(root)'
from org/jruby/RubyKernel.java:1038:in `require'
from C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/config/environment.rb:167:in `load_environment'
from file:/C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/lib/jruby-rack-1.1.1.jar!/jruby/rack/rails.rb:172:in `to_app'
from file:/C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/lib/jruby-rack-1.1.1.jar!/jruby/rack/rails.rb:192:in `new'
from :1:in `(root)'
from org/jruby/RubyKernel.java:2062:in `instance_eval'
from file:/C:/apache-tomcat-7.0.22/webapps/ws/WEB-INF/lib/jruby-rack-1.1.1.jar!/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.PoolingRackApplicationFactory.getApplication(PoolingRackApplicationFactory.java:95)
at org.jruby.rack.DefaultRackDispatcher.getApplication(DefaultRackDispatcher.java:23)
at org.jruby.rack.AbstractRackDispatcher.process(AbstractRackDispatcher.java:28)
at org.jruby.rack.AbstractFilter.doFilter(AbstractFilter.java:32)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:304)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `relative_url_root=' for ActionController::Base:Class