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 files specify js/css files 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 files
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