Work on this PR is pending this sprockets change https://github.com/sstephenson/sprockets/pull/514