Re:Sprockets 2.0.0 released (Ruby/Rack asset packaging)
by rubymaverick on Monday August 29, 2011 @04:30PM
(#2938792)
Check out the Ruby on Rails guide on the subject:
http://ryanbigg.com/guides/asset_pipeline.html
DHH also talked a lot about it in his keynote this year at RailsConf:
http://www.rubyinside.com/dhh-keynote-streaming-live-from-ra...
Re:Sprockets 2.0.0 released (Ruby/Rack asset packaging)
by tenderlove on Monday August 29, 2011 @06:07PM
(#2939269)
I think it's unlikely that many people will switch from Jammit to Sprockets. At work, we will not switch. Sprockets is built on the assumption that you will be running a JavaScript runtime on your production machines. I'd prefer that we (the rails team) had a solution that didn't make such an assumption. That way the solution could work with or without a JS runtime in production.
Re:Sprockets 2.0.0 released (Ruby/Rack asset packaging)
by jashkenas on Monday August 29, 2011 @07:39PM
(#2939488)
Out of curiosity, is there anything in Sprockets 2.0 that's enticing you towards switching over -- apart from being the Rails 3.1 default?
Re:Sprockets 2.0.0 released (Ruby/Rack asset packaging)
by tenderlove on Monday August 29, 2011 @08:11PM
(#2939567)
Well, we don't have a JS runtime on all our web boxes in production. As such, we precompile all our assets before deploying, so sprockets doesn't really buy us much besides being "baked in". To migrate our apps, it seems easier to upgrade rails, but continue to use our current asset compilation system.
Re:Sprockets 2.0.0 released (Ruby/Rack asset packaging)
by riffraff on Monday August 29, 2011 @04:24PM
(#2938759)
I second the question.
FWIW the current deploy procedure I use for $job (written by a colleague) is an unholy mix of jammit, spritemapper, rake, %x{git} and asset_id.
It _does_ work, but I am quite looking forward to the integration of rails 3.1 to get rid of it.
Right now, I'm just using asset_id (https://github.com/moocode/asset_id) to dump my assets on S3/CloudFront with md5s in the filenames, pretending to myself that that will make everything fast.
It seems like all the gems provide different things, whether it's CSS minification, JS minification, includes to combine many files together, automatic aggregation of multiple JS/CSS files, CSS sprites, easy uploading to CDNs, different strategies for cache busting (md5 of file vs node timestamp)...
I'm presuming that with Rails 3.1, everyone is going to switch over to Sprockets 2.0 from Jammit (which is what it seemed like everyone used before). However, I honestly have no idea what's going on or where the big wins are.
What's up?