News for hackers. Stuff that matters.
Re:If you are running Rails on Heroku, use this gem to prope... by tomfakes on Friday March 01, 2013 @01:40PM (#5306052)
I've been meaning to write something like this for the last few months.

Rails apps on Heroku need a number of non-default configurations to work well, and this is one of them.

Thanks for this - I'll add it to a project this weekend and probably do an updated version of my blog post on this subject: http://blog.craz8.com/articles/2012/12/7/heroku-config-for-p...

Re:If you are running Rails on Heroku, use this gem to prope... by Michikono on Friday March 01, 2013 @01:12PM (#5305892)
I think this is a better suggestion: https://github.com/rumblelabs/asset_sync

It uploads all your assets to S3 during pre-compile. It keeps ALL of the asset loading logic off your application.

Also, it uploads .gz versions of all assets.

Re:If you are running Rails on Heroku, use this gem to prope... by jbaudanza on Friday March 01, 2013 @01:18PM (#5305924)
There are a few reasons I don't do this. For one, deploys take longer. Also S3 isn't able to negotiate the Accept-Encoding header. So you have to assume that all your clients will be able to handle gzipped assets.

You can use your app as a root origin for your assets, and then use something like CloudFront to offload most of the work.

Re:If you are running Rails on Heroku, use this gem to prope... by Michikono on Sunday March 03, 2013 @04:51PM (#5315385)
For the record, serving assets off S3 directly isn't a good idea. We use cloud front for that as well. Making the actual app the root origin is a good idea though. Need to think a little about the full ramifications of that versus simply having the S3 asset bucket the origin.