Skip to content

Instantly share code, notes, and snippets.

View kiyoto1022's full-sized avatar

kyonta1022 | kiyoto_akiyama kiyoto1022

View GitHub Profile
@ebeigarts
ebeigarts / RAILS_RELATIVE_URL_ROOT.md
Last active February 2, 2023 15:16
RAILS_RELATIVE_URL_ROOT

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