Your SlideShare is downloading. ×
0
Rails 3.1 Asset pipeline
Rails 3.1 Asset pipeline
Rails 3.1 Asset pipeline
Rails 3.1 Asset pipeline
Rails 3.1 Asset pipeline
Rails 3.1 Asset pipeline
Rails 3.1 Asset pipeline
Rails 3.1 Asset pipeline
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Rails 3.1 Asset pipeline

1,133

Published on

Slides from my presentation at WellRailed (27th July 2011) …

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

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,133
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Rails 3.1Asset Pipeline Jeremy Olliver
  • 2. Rails 3.1 Release Schedule• August 8th: Rails 3.1.0.rc6• August 22nd: Rails 3.1.0
  • 3. Native Support for• Sass• Coffeescript• asset packaging/minification/compression• cache friendly static filenames (hash in filename not mtime querystring)
  • 4. Assets Directory Structureapp assets javascripts stylesheets imagesoptional:lib/assets (non-application specific assets)vendor/assets (third party assets, css/js plugins etc)
  • 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

×