I am attempting to deploy a Rails 3.0.0 application to a sub URI using passenger 2.2.15.
I believe I’ve made the correct RailsBaseURI changes to my http.conf , have symlinked the sub URI to the public directory of my app and added the following line of code to environments/production.rb:
config.action_controller.relative_url_root = "/sub_uri"
I’ve done this several times pre-rails3.0.0. That said, the app won’t launch. It fails with the following Passenger error:
Error Message: wrong number of arguments(1 for 0)
Exception class: ArgumentError
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0/lib/action_controller/railtie.rb 54 in `relative_url_root='
Is there an incompatibility between passenger 2.2.15 and rails 3.0.0 that affects sub URI’s?
Any help sorting out this error is greatly appreciated.
The setter is depreciated, it’s nowhere to be found in
actionpack/lib/action_controller/railtie.rb.As seen here (
actionpack/lib/action_controller/depreciated/base.rb):In
actionpack/lib/action_controller/metal/compatibility.rbyou can see it’s setter is anENVvariable:So you need to set the ENV variable:
RAILS_RELATIVE_URL_ROOT="/sub_uri"