class Sprockets::BundledAsset

def check_circular_dependency!

error. Otherwise you end up with a StackOverflow error.
Check if self has already been required and raise a fast
def check_circular_dependency!
  requires = @options[:_requires] ||= []
  if requires.include?(pathname.to_s)
    raise CircularDependencyError, "#{pathname} has already been required"
  end
  requires << pathname.to_s
end