Forum: Ruby on Rails Running assets:precompile inside my rails app

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Cris S. (Guest)
on 2016-12-08 20:10
Hi Rubyists,

Application A, a rails app, is responsible for deploying application B,
also a rails app.  Application B's war file (JRuby) will be seeded with
a file called context.txt at the root of the war file.

context.txt might have a one liner like:


I need, in application B's initializer, for it to run assets:precompile.
This cannot be done in advance as the user in application A will end up
choosing a context from a list of contexts preconfigured to work with
our apache mod_proxy server.

So if I have (in config/initializers/z_last.rb)

load 'Rakefile'

It would be nice if all the assets are compiled (they aren't -- only

production.rb would have:

 config.relative_url_root = $context #from file


This topic is locked and can not be replied to.