Slides from my presentation at WellRailed (27th July 2011)
Additional Links: http://ryanbigg.com/guides/asset_pipeline.html
twitter: @static_storm
blog: http://incitecode.com
5. How Does it Work?
⢠manifest ďŹles specify js/css ďŹles to load
⢠app/assets/javascripts/application.js
⢠app/assets/stylesheets/application.css
⢠Only needs changing for specifying load order
⢠Picks up coffeescript, javascript, css, and sass ďŹles
6. Coffeescript / JS
compilation
⢠provided through sprockets and execjs
⢠Need to include a javascript runtime such
as node.js or a native ruby implementation
such as gems âtherubyracerâ or âmustangâ
7. Sass / Compass /
Referencing assets
⢠use compass ârails31â branch
⢠use sass (scss) itâs awesome
⢠referencing assets/images requires erb and
asset_path helper
8. Deployment
⢠updated capistrano version coming up
⢠in the meantime:
⢠rake assets:precompile
RAILS_ENV=production
⢠compiles to public/assets