0

Someone posted something similar but it didn't really solve the problem.

I want to move all my static files (images, javascript, css) to an Amazon S3 bucket when I deploy my app, as well as rewrite those paths in my app, is there a simple way to accomplish this? or am I in for a huge amount of work here?

Community
  • 1
  • 1
JP Silvashy
  • 46,977
  • 48
  • 149
  • 227
  • Just out of curiosity, why do you want to do this? – Peter Brown Mar 22 '10 at 04:15
  • 2
    Huh? Why wouldn't you want to serve your static content from a content delivery network with hugely powerful servers around the world... Why waste my server's bandwidth sending static content? My servers memory and bandwidth is best used serving user specific data. – JP Silvashy Mar 23 '10 at 19:19

2 Answers2

1

The other question was mine :p

I ended up going with a rake task that I tied in with asset_packager and my "normal" heroku deployment process.

I would love something was much smarter and could do the heavy lifting for me though.

Toby Hede
  • 36,755
  • 28
  • 133
  • 162
0

I also left an answer at the other question, I'm was looking into the same issue and will give this gem https://github.com/railsjedi/jammit-s3 a try later today.

Hope it helps, Jeroen

Jevado
  • 146
  • 2
  • Just implemented it, have a look at the https://github.com/makalu/jammit-s3 fork. It will enable you to set cache-control headers for the assets as well, which will add turbomode to your website! – Jevado Mar 31 '11 at 19:43