4

Is there an easy way to you this with the asset pipeline and deploying to heroku / s3?

I would like my local rails app to use image/css/js locally as per normal.

And when you pre-compile, is there an easy way for the production app to serve it's assets from s3 (while dev assets are local). And also when you pre-compile / deploy to heroku, the newly compiled assets are sent up to s3 automatically?

This is so the developer (me :D ) does not have to keep manually updating s3 with the new deployed files?

Thanks.

CafeHey
  • 5,699
  • 19
  • 82
  • 145

2 Answers2

3

I believe this is what you're looking for:

http://ckdake.com/content/2011/rails-31-assets-on-s3-with-https.html

Make sure you use up-to-date gems, as this guide is for rails 3.1 (in case you use 3.2+)

martinjlowm
  • 871
  • 5
  • 8
1

Heroku has good docs on this now, here:

https://devcenter.heroku.com/articles/cdn-asset-host-rails31

Which recommends this gem:

https://github.com/rumblelabs/asset_sync

John Bachir
  • 22,495
  • 29
  • 154
  • 227