it puts the config inside the block or else it gets the exception again
config/deploy/caching.rb -> config/deploy/production.rb

This fixes an issue where assets compilation was thinking RAILS_ENV=caching.