Try asset_sync gem . This allows you to do exactly what you want: use the resource pipeline locally, and then serve assets from S3 (optionally through Cloudfront) after clicking on Heroku.
Note that the Heroku compilation step usually does not provide access to configuration variables, and you need these configuration variables for asset_sync to click on S3. The solution for this (and actually the full asset_sync resource) is published in Using CDN Asset Host with Rails 3.1 .
The disadvantage of this approach is that it violates some of the 12 application factors - in particular, it relates to "assembly, release, running." This has some negative consequences: for example, heroku releases:rollback will roll back your application, but will not recompile and reload your assets.
source share