Hi foreman devs,
On Thursday I merged https://github.com/theforeman/foreman/commit/418e709df58c4114ddf77fc88aed8da31f1e63ff.
This commit applies Rails default environment configurations to our
project, what you get after running 'rails new'.
One of the new options in the development environment is:
- config.assets.raise_runtime_errors = true
- Precompiles assets on development
- Raises errors when an asset is missing on the precompile
list and is required. Before, Rails would work on development
but on production it would fail.
Overall I think the change is positive because it forces us to ensure
assets are precompiled and we follow best practices. It raises an
error when we add '/assets' to the path of an asset, which is
unnecessary on Sprockets 3, for instance.
I tested that PR using the author branch w/o pulling Patternfly
and it worked. However, with Patternfly it raises one of these errors.
Moreover, assets from plugins need to be added to the
config.assets.precompile list in order to be used, but they were not.
I fixed this through https://github.com/theforeman/foreman/pull/3031,
which adds plugin asset paths to assets.precompile, and other minor
errors. An equivalent fix in Katello to add Bastion assets to precompile
is here: https://github.com/Katello/katello/pull/5696
assets are precompiled, so remember to turn this setting off to
In case you see any errors you can either work out of that branch, or
simply disable config.assets.raise_runtime_errors = false on
In retrospective, I should have been more careful and tested that
setting with more plugins & Patternfly on, but I didn't foresee this.
Sorry for the havoc, and I hope it won't affect you at all with the
patches I posted above. Please reply to these PRs if you see any other
···-- Daniel Lobato Garcia