-
Notifications
You must be signed in to change notification settings - Fork 99
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
Support sprockets-rails ~> 3.2 #54
base: master
Are you sure you want to change the base?
Conversation
@obliviusm pls fix broken tests |
Not sure about the issue/fix, but having a dummy Rails app to test is definitely something good to have. @modsognir What do you think if I create a new PR just to add the Rails app test for the current code in |
@repinel there is dummy app in this pr |
Sorry I missed this one folks. @repinel yes, if the dummy app was split into a seperate PR that would make this one a lot easier to check over. Not sure why this is failing on 1.9.3 but I think we might be able to remove that as 1.9.3 hasn't been officially supported in 2 years. |
@modsognir I can work on it |
Hello. Let me explain myself
Problem: New version of sprockets-rails is not compatible with princely. In new version of sprockets-rails code
Rails.application.assets
returns assets for development environment but doesn't return assets in production-like environments.Solution: I've modified
AssetSupport#asset_file_path
. So it generates the sprockets environment if it finds Rails.application.assets to be nil.This solution is taken from Compass/compass-rails#263 . They had the same problem.
In this PR I've done next:
AssetSupport#asset_file_path
that checks production environment. If you run this test with the old version ofAssetSupport#asset_file_path
you'll see that it fails.AssetSupport#asset_file_path
as described in solutionThanks