By default, when assets are precompiled, the paths are generated as absolute paths beginning with
If your application is running under a sub-uri and your asset path is being generated by Rails, you can make Rails include the sub-uri in the asset path by setting the following Capistrano variable to define the
Capistrano will include this in the
assets:precompile task, which will ensure Rails generates the correct asset paths under
set :asset_env, "RAILS_GROUPS=assets RAILS_RELATIVE_URL_ROOT='/my-sub-uri'"