Fix assets:precompile in Production mode when using Sprockets 3.#263
Merged
craigmcnamara merged 4 commits intoCompass:masterfrom Feb 15, 2016
Merged
Fix assets:precompile in Production mode when using Sprockets 3.#263craigmcnamara merged 4 commits intoCompass:masterfrom
craigmcnamara merged 4 commits intoCompass:masterfrom
Conversation
Contributor
Author
|
@craigmcnamara I've added a test here, and updated the changelog and version. It'd be great to see this merged and a new gem released. Let me know if I can do anything else? cc: @mvastola Fixes #257 |
craigmcnamara
added a commit
that referenced
this pull request
Feb 15, 2016
Fix assets:precompile in Production mode when using Sprockets 3.
Member
|
I just cut 3.0.1, thanks for the pull request. |
dennmart
added a commit
to dennmart/react-rails
that referenced
this pull request
Sep 12, 2017
Taken from the changes done in the compass-rails gem: Compass/compass-rails#263
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The sprockets 3.0 gem has changed such that Rails.application.assets is nil in production mode (due to config.assets.compile being set to false). This means rake assets:precompile no longer works in a production environment.
This PR changes compass-rails so it generates the sprockets environment if it finds Rails.application.assets to be nil.
It also adds a test to ensure that precompiling runs correctly when config.assets.compile = false.