rails/rails — Issue #3645: ActionController::DeprecatedBehavior.relative_url_root= missing parameter
Author: mhuffnagle
Created: 2011-11-16 14:33:11+00:00
State: open

I have a Rails 3.0.10 project that I'm attempting to deploy to Tomcat 7.0.22 with JRuby 1.6.5 and Warbler 1.3.2. When I deploy it to the root context (without a relative URL root), it works fine. If I deploy it to some other context (/myapp, for example), I get the following exception:

```
ArgumentError: wrong number of arguments (1 for 0)
send at org/jruby/RubyKernel.java:2097
Railtie at /home/myproject/apache-tomcat-7.0.22/webapps/myproject-rails-gui/WEB-INF/gems/gems/actionpack-3.0.10/lib/action_controller/railtie.rb:54
```

That section of code is:

```ruby
ActiveSupport.on_load(:action_controller) do
include app.routes.url_helpers
options.each { |k,v| send("#{k}=", v) } # << Line 54
end
```

The options.each is failing when it gets to the : relative_url_root key. The setter for relative_url_root is defined in **actionpack/lib/action_controller/deprecated/base.rb**, but right now is causing a failure because it does not accept an argument. I haven't been able to trace back why that's being set but, in any case, it's failing when it gets there.

I'll create a fix for this and issue a pull request but wanted to create a placeholder ticket for it.