warbler WAR to deploy at tomcat, trouble with relative URL root

82 Views Asked by At

I have a Rails 4.2.7.1 project that I'm attempting to deploy to Tomcat 7 with JRuby 9.1.5.0 and Warbler 2.0.4
When I deploy it to the root context it works fine. If I deploy it to some other context (/myApp, for example - tomcat does it so), images under PUBLIC are not found because the path is incorrect.
The assets are searched for "/", but are under "/myApp/".
Can I specify the warbler (/config/warble.rb for example)?
Or how else can I set the path correctly?

1

There are 1 best solutions below

0
Ruslan On

Deploying to sub-directories can be a pain.

First check if the asset_host is correct:

config.action_controller.asset_host = 'https://your.site/myApp'

and config.ru looks like:

map '/myApp' do
  run ApplicationName::Application
end