I have run into a small snag, and a fear that it may be a simple question, but we will see.
My Environment:
nginx/mongrel/rails
Most people I know use a ROOT app for their rails application, but I would like my app to sit under a relative path. The reason I want a relative path is that we will have many rails apps, and I want to Layer7/Proxy to backend servers, and not have virtual hosts for each app.
ie:
Now this works all fine and good except rails cannot find the route:
/tj/
/tk/
This is the error that I am getting:
ActionController::RoutingError (No route matches "/tj/" with {:method=>:get}):
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/routing.rb:1441:in `recognize_path'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/routing.rb:1424:in `recognize'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:170:in `handle_request'
So, my question:
How do I set this relative path in my rails application?
I tried:
environment.rb
RAILS_RELATIVE_URL_ROOT='/tj/'
This did not help. Any advice would be great.
/sc