SlideShare a Scribd company logo
Rails 3.1
Asset Pipeline
   Jeremy Olliver
Rails 3.1 Release
         Schedule

• August 8th: Rails 3.1.0.rc6
• August 22nd: Rails 3.1.0
Native Support for

• Sass
• Coffeescript
• asset packaging/minification/compression
• cache friendly static filenames (hash in
  filename not mtime querystring)
Assets Directory
             Structure
app
 assets
   javascripts
   stylesheets
   images

optional:
lib/assets (non-application specific assets)
vendor/assets (third party assets, css/js plugins etc)
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
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’
Sass / Compass /
    Referencing assets

• use compass ‘rails31’ branch
• use sass (scss) it’s awesome
• referencing assets/images requires erb and
  asset_path helper
Deployment
• updated capistrano version coming up
• in the meantime:
 • rake assets:precompile
    RAILS_ENV=production
• compiles to public/assets

More Related Content

PDF
Introduction to Rails by Evgeniy Hinyuk
PDF
Lecture #5 Introduction to rails
PDF
Demystifying Ruby on Rails
PDF
2019-06-12 aOS Aix Marseille - C4 - Un besoin 10 solutions Azure Fighter - Fé...
PDF
【EDD Workshop@140829】iOS Models-Core Data_by Boska-Lee
PPTX
AWS Distilled
PDF
React.js for Rails Developers
PPTX
Serverless in azure
Introduction to Rails by Evgeniy Hinyuk
Lecture #5 Introduction to rails
Demystifying Ruby on Rails
2019-06-12 aOS Aix Marseille - C4 - Un besoin 10 solutions Azure Fighter - Fé...
【EDD Workshop@140829】iOS Models-Core Data_by Boska-Lee
AWS Distilled
React.js for Rails Developers
Serverless in azure

What's hot (19)

PPT
Intro to SPA using JavaScript & ASP.NET
ODP
Rails 3 Asset Pipeline
PDF
Introduction 2 to aws and storage options
PDF
Asp.net
PDF
Rupy2012 ArangoDB Workshop Part2
PPTX
Architecture - why so serious?
PDF
Easy Object Storage Import/Export Using the S3 Connector on Jetstream
PPTX
Wikipedia Cloud Search Webinar
PPTX
Training on iOS app development - Samesh Swongamikha & Neetin Sharma
PPTX
Node ts1
KEY
Backbonification for dummies - Arrrrug 10/1/2012
PDF
Cloud Computing Training
PDF
Short introduction to Redis
PDF
Building a spa_in_30min
PPT
Jasig rubyon rails
PDF
Being With Rails App For 3 Years
PPT
Rails engines
PPTX
Signal rity1
PDF
Node.js server side render in the Age of APIs - Full Stack Toronto 2017
Intro to SPA using JavaScript & ASP.NET
Rails 3 Asset Pipeline
Introduction 2 to aws and storage options
Asp.net
Rupy2012 ArangoDB Workshop Part2
Architecture - why so serious?
Easy Object Storage Import/Export Using the S3 Connector on Jetstream
Wikipedia Cloud Search Webinar
Training on iOS app development - Samesh Swongamikha & Neetin Sharma
Node ts1
Backbonification for dummies - Arrrrug 10/1/2012
Cloud Computing Training
Short introduction to Redis
Building a spa_in_30min
Jasig rubyon rails
Being With Rails App For 3 Years
Rails engines
Signal rity1
Node.js server side render in the Age of APIs - Full Stack Toronto 2017
Ad

Viewers also liked (7)

PPTX
Networks and Distance Learning
PPS
Our universe
PPT
Multimedia presentation
PPT
Multimedia presentation
PPT
Multimedia presentation
PPT
Multimedia presentation
PPTX
Vero
Networks and Distance Learning
Our universe
Multimedia presentation
Multimedia presentation
Multimedia presentation
Multimedia presentation
Vero
Ad

Similar to Rails 3.1 Asset pipeline (20)

PDF
OSGi, Scripting and REST, Building Webapps With Apache Sling
PDF
Understanding asset pipeline plugin
PDF
Asset Pipeline in Ruby on Rails
PDF
PLAT-7 Spring Web Scripts and Spring Surf
PDF
PLAT-7 Spring Web Scripts and Spring Surf
PDF
PLAT-16 Using Enterprise Content in Grails
KEY
Rails 3.1
PDF
PLAT-8 Spring Web Scripts and Spring Surf
PDF
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
 
PDF
An Intense Overview of the React Ecosystem
PDF
Create a new project in ROR
PDF
Spring Day | Spring 3.1 in a Nutshell | Sam Brannen
PDF
Spring 3.1 in a Nutshell - JAX London 2011
PDF
An architecture for federated data discovery and lineage over on-prem datasou...
PPT
Stacktician - CloudStack Collab Conference 2014
PPTX
Scaling horizontally on AWS
PDF
Rails - getting started
PDF
Rails api + JS app
PDF
JCR - Java Content Repositories
PDF
Client Side MVC with Backbone and Rails
OSGi, Scripting and REST, Building Webapps With Apache Sling
Understanding asset pipeline plugin
Asset Pipeline in Ruby on Rails
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-16 Using Enterprise Content in Grails
Rails 3.1
PLAT-8 Spring Web Scripts and Spring Surf
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
 
An Intense Overview of the React Ecosystem
Create a new project in ROR
Spring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring 3.1 in a Nutshell - JAX London 2011
An architecture for federated data discovery and lineage over on-prem datasou...
Stacktician - CloudStack Collab Conference 2014
Scaling horizontally on AWS
Rails - getting started
Rails api + JS app
JCR - Java Content Repositories
Client Side MVC with Backbone and Rails

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
cuic standard and advanced reporting.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
A Presentation on Artificial Intelligence
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Encapsulation theory and applications.pdf
PPTX
Tartificialntelligence_presentation.pptx
PPT
Teaching material agriculture food technology
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
MYSQL Presentation for SQL database connectivity
Per capita expenditure prediction using model stacking based on satellite ima...
Reach Out and Touch Someone: Haptics and Empathic Computing
cuic standard and advanced reporting.pdf
Spectral efficient network and resource selection model in 5G networks
20250228 LYD VKU AI Blended-Learning.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Programs and apps: productivity, graphics, security and other tools
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Network Security Unit 5.pdf for BCA BBA.
A Presentation on Artificial Intelligence
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Encapsulation theory and applications.pdf
Tartificialntelligence_presentation.pptx
Teaching material agriculture food technology
Assigned Numbers - 2025 - Bluetooth® Document
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Diabetes mellitus diagnosis method based random forest with bat algorithm
MYSQL Presentation for SQL database connectivity

Rails 3.1 Asset pipeline

  • 1. Rails 3.1 Asset 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 Structure app assets javascripts stylesheets images optional: 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