Assets break in sub URI deployments
benedictleejh opened this issue · comments
When deploying to a sub URI, X::Editable::Rails
is still looking for assets at /assets
instead of /sub-uri/assets
, breaking the images and glyphicons.
Edit: This is on Rails 4.0.2, and X::Editable::Rails 1.5.1
So after many hours of trying to figure out the issue, it seems that this is an issue with Capistrano, rake, rails, and sprockets rather than X::Editable::Rails directly. Basically, in order to precompile assets properly, the relative URL root has to be passed to the assets:precompile
task. In the end I simply set config.action_controller.relative_url_root = '/sub_uri'
inside environments/production.rb
and that allowed the paths to compile correctly.