As per the documentation on http://guides.rubyonrails.org/configuring.html#deploy-to-a-subdirectory-relative-url-root I set the ENV var RAILS_RELATIVE_URL_ROOT = "/app1".
I setup a basic route:
Rails.application.routes.draw do
root 'pages#home'
resources :cats, only: [:show, :index]
end
To test this I output:
# views/pages/home.html.erb
<pre>
<%= cats_url %>
<%= cats_path %>
<%= Rails.application.config.relative_url_root %>
</pre>
The output is:
http://localhost:3000/cats
/cats
/app1
Not http://localhost:3000/app1/cats as could be expected.
Sorry if there is no test to go along with this issue but I currently have really limited bandwidth and cannot download the whole rails repo to set it up.
As per the documentation on http://guides.rubyonrails.org/configuring.html#deploy-to-a-subdirectory-relative-url-root I set the ENV var
RAILS_RELATIVE_URL_ROOT = "/app1".I setup a basic route:
To test this I output:
The output is:
Not
http://localhost:3000/app1/catsas could be expected.Sorry if there is no test to go along with this issue but I currently have really limited bandwidth and cannot download the whole rails repo to set it up.