RAILS_RELATIVE_URL_ROOT Rails By default RAILS_RELATIVE_URL_ROOT is used only for asset pipeline. To namespace your rails routes you need to wrap run MyApp::Application with map in your config.ru: map ENV['RAILS_RELATIVE_URL_ROOT'] || "/" do