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| # npm using https for git | |
| git config --global url."https://github.com/".insteadOf [email protected]: | |
| git config --global url."https://".insteadOf git:// | |
| # npm using git for https | |
| git config --global url."[email protected]:".insteadOf https://github.com/ | |
| git config --global url."git://".insteadOf https:// |
| require 'sinatra' | |
| require 'action_mailer' | |
| class Mailer < ActionMailer::Base | |
| def contact | |
| mail( | |
| :to => "[email protected]", | |
| :from => "[email protected]", | |
| :subject => "Test") do |format| | |
| format.text |