Repository: rails/rails

Issue #4308:  config.action_controller.relative_url_root doesn't work in Rails 3.1
Created: 2012-01-04T23:04:28Z
According to documentation, there is a configuration option config.action_controller.relative_url_root:
http://guides.rubyonrails.org/configuring.html#configuring-action-controller
But when I set  config.action_controller.relative_url_root, I get:
<NoMethodError: undefined method `relative_url_root=' for ActionController::Base:Class>
org/jruby/RubyKernel.java:2097:in `send'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/actionpack-3.1.3/lib/action_controller/railtie.rb:37:in `Railtie'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/ordered_hash.rb:162:in `each'
org/jruby/RubyArray.java:1612:in `each'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/ordered_hash.rb:162:in `each'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/actionpack-3.1.3/lib/action_controller/railtie.rb:37:in `Railtie'
org/jruby/RubyKernel.java:2062:in `instance_eval'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:43:in `run_load_hooks'
org/jruby/RubyArray.java:1612:in `each'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/actionpack-3.1.3/lib/action_controller/base.rb:234:in `Base'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/actionpack-3.1.3/lib/action_controller/base.rb:171:in `ActionController'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/actionpack-3.1.3/lib/action_controller/base.rb:3:in `(root)'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/actionpack-3.1.3/lib/action_controller/base.rb:31:in `ext'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/actionpack-3.1.3/lib/action_dispatch/middleware/static.rb:15:in `match?'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/actionpack-3.1.3/lib/action_dispatch/middleware/static.rb:47:in `call'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/engine.rb:456:in `call'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/rack-1.3.6/lib/rack/content_length.rb:14:in `call'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/rack/log_tailer.rb:14:in `call'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/rack-1.3.6/lib/rack/handler/mongrel.rb:77:in `process'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:159:in `process_client'
org/jruby/RubyArray.java:1612:in `each'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:158:in `process_client'
C:/java/jruby-1.6.5.1/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java/lib/mongrel.rb:285:in `run'
org/jruby/RubyProc.java:270:in `call'
org/jruby/RubyProc.java:224:in `call'

Duplicate issue #4820: config.relative_url_root is not recognized in routes (3.2.1)
Created: 2012-02-01T12:36:19Z
When using config.relative_url_root = /subfolder, the generated routes are not having the prefix appended. I think that by using config.relative_url_root the routing should automatically place the prefix. It's not very elegant to have to repeat the subfolder by placing a scope :path => "/subfolder" do end in routes.rb.

Closing comment (2012-06-30T20:57:56Z): I think this is a duplicate of #4308 @tenderlove