I have a Rails 3.2 Project deployed to Heroku and using Asset Sync that has grown to a point where there are so many assets that Precompiling them on Heroku is too slow. So I'm using:
$ rake assets:precompile
… to compile the assets locally (with Asset Sync pushing them to an S3 bucket). Obviously this creates an assets
folder in my public folder containing all the precompiled assets.
Now when I push to Heroku, it sees that I've precompiled my assets and skips precompilation, making my deploy much faster.
The problem comes when I go back to developing locally. Now that the assets are precompiled, Rails uses those assets and doesn't pick up changes I make to my local files. The obvious thing to do is to delete the assets, but this means that every time I push I need to first re-precompile the assets which is time-consuming.
So how can I tell Rails to ignore any assets in the public directory and use my unprecompiled local files whilst in the development environment.