Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mp/oc id missing all.svg #1267

Merged
merged 2 commits into from
May 15, 2017
Merged

Mp/oc id missing all.svg #1267

merged 2 commits into from
May 15, 2017

Conversation

marcparadise
Copy link
Member

enable compilation of missing assets, so that
requests to all.svg no longer 404. This
dependency is defined and added in chef-web-core.
Building the assets in precompile generates everything including
all-FINGERPRINT.svg, however Rails is not using the fingerprint
in this case.

This is a simple fix after exploring the asset generation and
not finding a sane way to either a) get rails to use
the fingerprint for this resource ; or b) get it to load the
un-fingerprinted version out of the gem.

Since this is the only missing asset, no impact is expected by
enabling compilation of missing resources.

Signed-off-by: Marc A. Paradise [email protected]

@marcparadise
Copy link
Member Author

marcparadise commented May 11, 2017

As an added benefit this will stop ocid logs from capturing an exception and stack trace on every hit.

@@ -27,7 +27,7 @@
# config.assets.css_compressor = :sass

# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
config.assets.compile = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work if nodejs isn't installed on the machine?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did run through with node uninstalled - but I'll verify that if it's never ther for the precompile phase, it still behaves just in case something got generated and retained.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've confirmed that this works when there is never a node package installed.

Eenable compilation of missing assets, so that
requests to `all.svg` no longer 404.  This
dependency is defined and added in chef-web-core.
Building the assets in precompile generates everything includeing
all-FINGERPRINT.svg, however Rails is not using the fingerprint
in this case.

This is a simple fix after exploring the asset generation and
not finding a sane way to either a) get rails to use
the fingerprint for this resource ; or b) get it to load the
un-fingerprinted version out of the gem.

Since this is the only missing asset, no impact is expected by
enabling compilation of missing resources.

Signed-off-by: Marc A. Paradise <[email protected]>
@marcparadise marcparadise force-pushed the mp/oc-id-missing-all.svg branch from 43696d6 to 23140a7 Compare May 15, 2017 14:56
@marcparadise marcparadise merged commit 721e70f into master May 15, 2017
@marcparadise marcparadise deleted the mp/oc-id-missing-all.svg branch May 15, 2017 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants