fix for Rails.configuration.cache_classes = true