class Sprockets::Asset

def relativize_root_path(path)

Replace actual environment root with `$root` placeholder.
def relativize_root_path(path)
  path.to_s.sub(/^#{Regexp.escape(@root)}/, '$root')
end