It's worth noting that I don't really like faster_pathname as a solution. It's a cudgel that monkeypatches the stdlib Pathname. A proper solution would be a Pathname subclass that Sprockets uses directly, allowing for customized behavior without potential side-effects in other systems.
Edit: if you just want to install a gem and skip the why, the parent has this blog post: https://www.coffeepowered.net/2014/02/09/faster-pathname/