SlideShare a Scribd company logo
1 of 15
Download to read offline
Bundle! is th" Best! 
BADCamp 2014 
@dead_arm
http://bundler.io/ 
https://github.com/bundler/bundler
Manage the rubygems you 
need… 
“Bundler makes sure Ruby applications run 
the same code on every machine” 
From https://github.com/bundler/bundler
and their dependencies! 
“and Bundler makes it easy to make sure 
that your application has the dependencies 
it needs to start up and run without errors.” 
From http://bundler.io/
These are 
a few of my 
favorite things! 
http://bplusmovieblog.files.wordpress.com/2013/10/the-sound-of-music-25.png
What can Bundle! do fo! you?
If you are... 
On" developer, working on on" project 
On" developer, working on man# projects 
On! of man" developers, working on on! project 
On! of man" developers, working on man" projects
Best Practices 
Create one bundle per theme 
Add gems to the Gemfile, not the 
Gemfile.lock 
Include ALL the gems you are using 
on the theme in the bundle
Best Practices 
Specify the version of the gem if you 
know which one you need, otherwise 
you can let Bundler handle it 
Update gems using Bundler, not 
manually 
Once you have the bundle set up, use it!
Recommendations 
State “require/bundler” in config.rb or set up 
a bash alias so that you don’t have to type 
“bundle exec…” 
Use “chruby” to manage your system’s ruby 
version (https://github.com/postmodern/chruby) 
Add the ruby version your gems use to your 
Gemfile
What d$s it loo% lik"?
config.rb 
# 
Require 
Rubygems 
and 
Bundler 
require 
'rubygems' 
require 
'bundler/setup' 
# 
Require 
Sass 
and 
Compass 
require 
'sass' 
require 
'compass' 
# 
Require 
additional 
gems 
require 
'breakpoint' 
require 
'fontcustom' 
# 
Set 
this 
to 
the 
root 
of 
your 
project 
when 
deployed: 
http_path 
= 
'/' 
css_dir 
= 
'css' 
sass_dir 
= 
'sass' 
fonts_dir 
= 
'fonts' 
images_dir 
= 
'images' 
javascripts_dir 
= 
'js' 
# 
Enable 
relative 
paths 
to 
assets 
relative_assets 
= 
true 
# 
Disable 
debugging 
comments 
line_comments 
= 
false 
# 
Indented 
syntax 
preferred_syntax 
= 
:sass 
# 
Add 
cache 
buster 
asset_cache_buster 
:none
Gemfile 
# 
Gemfile 
source 
"https://rubygems.org" 
ruby 
"2.0.0" 
gem 
"sass", 
"~> 
3.3.0.rc.2" 
gem 
"compass", 
"~> 
1.0.0.alpha.13" 
gem 
"breakpoint", 
"~> 
2.4.0" 
gem 
"fontcustom", 
"~> 
1.3.3"
Gemfile.lock GEM 
remote: 
https://rubygems.org/ 
specs: 
breakpoint 
(2.4.0) 
compass 
(~> 
1.0.0.alpha.13) 
sass 
(~> 
3.3.0.rc.2) 
sassy-­‐maps 
(< 
1.0.0) 
chunky_png 
(1.2.9) 
compass 
(1.0.0.alpha.17) 
chunky_png 
(~> 
1.2) 
compass-­‐core 
(~> 
1.0.0.alpha.16) 
compass-­‐import-­‐once 
(~> 
1.0.1) 
json 
listen 
(~> 
1.1.0) 
sass 
(~> 
3.3.0.rc.1) 
compass-­‐core 
(1.0.0.alpha.16) 
multi_json 
(~> 
1.0) 
sass 
(>= 
3.3.rc.1) 
compass-­‐import-­‐once 
(1.0.1) 
ffi 
(1.9.3) 
fontcustom 
(1.3.3) 
json 
(~> 
1.4) 
listen 
(~> 
1.0) 
thor 
(~> 
0.14) 
json 
(1.8.1) 
listen 
(1.1.6) 
rb-­‐fsevent 
(>= 
0.9.3) 
rb-­‐inotify 
(>= 
0.9) 
rb-­‐kqueue 
(>= 
0.2) 
multi_json 
(1.8.2) 
rb-­‐fsevent 
(0.9.3) 
rb-­‐inotify 
(0.9.3) 
ffi 
(>= 
0.5.0) 
rb-­‐kqueue 
(0.2.0) 
ffi 
(>= 
0.5.0) 
sass 
(3.3.0.rc.2) 
listen 
(~> 
1.1.0) 
sassy-­‐maps 
(0.3.1) 
compass 
(~> 
1.0.0.alpha.13) 
sass 
(~> 
3.3.0.rc.2) 
thor 
(0.19.1) 
PLATFORMS 
ruby 
DEPENDENCIES 
breakpoint 
(~> 
2.4.0) 
compass 
(~> 
1.0.0.alpha.13) 
fontcustom 
(~> 
1.3.3) 
sass 
(~> 
3.3.0.rc.2)
Than# You 
BADCamp 2014 
@dead_arm

More Related Content

What's hot

a_rubygem_for_iknow_api
a_rubygem_for_iknow_apia_rubygem_for_iknow_api
a_rubygem_for_iknow_api
Nov Matake
 
CoffeeScript presentation
CoffeeScript presentationCoffeeScript presentation
CoffeeScript presentation
John Lynch
 
Javascript orientado a testes
Javascript orientado a testesJavascript orientado a testes
Javascript orientado a testes
Alexandre Gomes
 

What's hot (20)

a_rubygem_for_iknow_api
a_rubygem_for_iknow_apia_rubygem_for_iknow_api
a_rubygem_for_iknow_api
 
CoffeeScript presentation
CoffeeScript presentationCoffeeScript presentation
CoffeeScript presentation
 
Javascript orientado a testes
Javascript orientado a testesJavascript orientado a testes
Javascript orientado a testes
 
Windows Azure loves OSS
Windows Azure loves OSSWindows Azure loves OSS
Windows Azure loves OSS
 
Grunt and Bower
Grunt and BowerGrunt and Bower
Grunt and Bower
 
Novajs
NovajsNovajs
Novajs
 
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the web
 
End to-End CoffeeScript
End to-End CoffeeScriptEnd to-End CoffeeScript
End to-End CoffeeScript
 
Node PDX: Intro to Sails.js
Node PDX: Intro to Sails.jsNode PDX: Intro to Sails.js
Node PDX: Intro to Sails.js
 
Introduction to Express and Grunt
Introduction to Express and GruntIntroduction to Express and Grunt
Introduction to Express and Grunt
 
Introduce cucumber
Introduce cucumberIntroduce cucumber
Introduce cucumber
 
Server side scripting smack down - Node.js vs PHP
Server side scripting smack down - Node.js vs PHPServer side scripting smack down - Node.js vs PHP
Server side scripting smack down - Node.js vs PHP
 
Sinatra + Heroku
Sinatra + HerokuSinatra + Heroku
Sinatra + Heroku
 
pebbles : A namespace for joke gems
pebbles : A namespace for joke gemspebbles : A namespace for joke gems
pebbles : A namespace for joke gems
 
RubyGem
RubyGemRubyGem
RubyGem
 
Introduction to node.js
Introduction to  node.jsIntroduction to  node.js
Introduction to node.js
 
CoffeeScript - An Introduction
CoffeeScript - An IntroductionCoffeeScript - An Introduction
CoffeeScript - An Introduction
 
Presentation of JSConf.eu
Presentation of JSConf.euPresentation of JSConf.eu
Presentation of JSConf.eu
 
ServiceWorker: New game changer is coming!
ServiceWorker: New game changer is coming!ServiceWorker: New game changer is coming!
ServiceWorker: New game changer is coming!
 
Server Side Apocalypse, JS
Server Side Apocalypse, JSServer Side Apocalypse, JS
Server Side Apocalypse, JS
 

Viewers also liked

Posters wonca2013
Posters wonca2013Posters wonca2013
Posters wonca2013
agunin69
 
Croatian Government's 1st Six Months [Infographic]
Croatian Government's 1st Six Months [Infographic]Croatian Government's 1st Six Months [Infographic]
Croatian Government's 1st Six Months [Infographic]
Tomislav Korman
 
Основы электрофизиологии
Основы электрофизиологииОсновы электрофизиологии
Основы электрофизиологии
crasgmu
 
Inanimate Alive Episode 5 by Kye & Charles
Inanimate Alive Episode 5 by Kye & CharlesInanimate Alive Episode 5 by Kye & Charles
Inanimate Alive Episode 5 by Kye & Charles
MrsPrentice
 
Awards Ceremony: K.C.'s Nominations, Romain Rolland FLS, 2014
Awards Ceremony: K.C.'s Nominations, Romain Rolland FLS, 2014Awards Ceremony: K.C.'s Nominations, Romain Rolland FLS, 2014
Awards Ceremony: K.C.'s Nominations, Romain Rolland FLS, 2014
Tanya Madjarova
 
Настоящий уровень инфляции
Настоящий уровень инфляцииНастоящий уровень инфляции
Настоящий уровень инфляции
alexeykonkov
 

Viewers also liked (20)

L2
L2L2
L2
 
Modena
ModenaModena
Modena
 
Insider
InsiderInsider
Insider
 
Online Political Campaigning: Croatia "Kukuriku" Case
Online Political Campaigning: Croatia "Kukuriku" CaseOnline Political Campaigning: Croatia "Kukuriku" Case
Online Political Campaigning: Croatia "Kukuriku" Case
 
Posters wonca2013
Posters wonca2013Posters wonca2013
Posters wonca2013
 
Kotak Warna Game by Fakhri
Kotak Warna Game by FakhriKotak Warna Game by Fakhri
Kotak Warna Game by Fakhri
 
The best wordpress backlink plugin get 150
The best wordpress backlink plugin   get 150The best wordpress backlink plugin   get 150
The best wordpress backlink plugin get 150
 
Leikko: Sussa on seksii - tietoa ja näyttöön perustuvia menetelmiä
Leikko: Sussa on seksii - tietoa ja näyttöön perustuvia menetelmiäLeikko: Sussa on seksii - tietoa ja näyttöön perustuvia menetelmiä
Leikko: Sussa on seksii - tietoa ja näyttöön perustuvia menetelmiä
 
Network bab1
Network bab1Network bab1
Network bab1
 
Facebook MidasLP Investment Valuation Summary And Strategic Analysis
Facebook MidasLP Investment Valuation Summary And Strategic AnalysisFacebook MidasLP Investment Valuation Summary And Strategic Analysis
Facebook MidasLP Investment Valuation Summary And Strategic Analysis
 
real estate agent in patna 9304611353
real estate agent in patna 9304611353real estate agent in patna 9304611353
real estate agent in patna 9304611353
 
Croatian Government's 1st Six Months [Infographic]
Croatian Government's 1st Six Months [Infographic]Croatian Government's 1st Six Months [Infographic]
Croatian Government's 1st Six Months [Infographic]
 
Основы электрофизиологии
Основы электрофизиологииОсновы электрофизиологии
Основы электрофизиологии
 
Inanimate Alive Episode 5 by Kye & Charles
Inanimate Alive Episode 5 by Kye & CharlesInanimate Alive Episode 5 by Kye & Charles
Inanimate Alive Episode 5 by Kye & Charles
 
Parent survey BMS 2011
Parent survey BMS 2011Parent survey BMS 2011
Parent survey BMS 2011
 
Awards Ceremony: K.C.'s Nominations, Romain Rolland FLS, 2014
Awards Ceremony: K.C.'s Nominations, Romain Rolland FLS, 2014Awards Ceremony: K.C.'s Nominations, Romain Rolland FLS, 2014
Awards Ceremony: K.C.'s Nominations, Romain Rolland FLS, 2014
 
Statische Websites in Rails 3.1
Statische Websites in Rails 3.1Statische Websites in Rails 3.1
Statische Websites in Rails 3.1
 
Entreprenuership & Startup for Young Graduates
Entreprenuership & Startup for Young GraduatesEntreprenuership & Startup for Young Graduates
Entreprenuership & Startup for Young Graduates
 
บทที่ 44
บทที่ 44บทที่ 44
บทที่ 44
 
Настоящий уровень инфляции
Настоящий уровень инфляцииНастоящий уровень инфляции
Настоящий уровень инфляции
 

Similar to Bundler is the Best

20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev
Frank Rousseau
 
Migrating Legacy Rails Apps to Rails 3
Migrating Legacy Rails Apps to Rails 3Migrating Legacy Rails Apps to Rails 3
Migrating Legacy Rails Apps to Rails 3
Clinton Dreisbach
 
Integrating Browserify with Sprockets
Integrating Browserify with SprocketsIntegrating Browserify with Sprockets
Integrating Browserify with Sprockets
Spike Brehm
 

Similar to Bundler is the Best (20)

Bundler
BundlerBundler
Bundler
 
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyConsegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
 
macos installation automation
macos installation automationmacos installation automation
macos installation automation
 
Composer
ComposerComposer
Composer
 
Fisl 11 - Dicas de Desenvolvimento Web com Ruby
Fisl 11 - Dicas de Desenvolvimento Web com RubyFisl 11 - Dicas de Desenvolvimento Web com Ruby
Fisl 11 - Dicas de Desenvolvimento Web com Ruby
 
Web Frontend development: tools and good practices to (re)organize the chaos
Web Frontend development: tools and good practices to (re)organize the chaosWeb Frontend development: tools and good practices to (re)organize the chaos
Web Frontend development: tools and good practices to (re)organize the chaos
 
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style GuidesAdvanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style Guides
 
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsCool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
 
Sprockets
SprocketsSprockets
Sprockets
 
The Future of Dependency Management for Ruby
The Future of Dependency Management for RubyThe Future of Dependency Management for Ruby
The Future of Dependency Management for Ruby
 
Composer
ComposerComposer
Composer
 
Automate Yo' Self
Automate Yo' SelfAutomate Yo' Self
Automate Yo' Self
 
Deploying your rails application to a clean ubuntu 10
Deploying your rails application to a clean ubuntu 10Deploying your rails application to a clean ubuntu 10
Deploying your rails application to a clean ubuntu 10
 
Boxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About ItBoxen: How to Manage an Army of Laptops and Live to Talk About It
Boxen: How to Manage an Army of Laptops and Live to Talk About It
 
Composer: putting dependencies on the score
Composer: putting dependencies on the scoreComposer: putting dependencies on the score
Composer: putting dependencies on the score
 
20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev
 
Migrating Legacy Rails Apps to Rails 3
Migrating Legacy Rails Apps to Rails 3Migrating Legacy Rails Apps to Rails 3
Migrating Legacy Rails Apps to Rails 3
 
Be Happy With Ruby on Rails - Ecosystem
Be Happy With Ruby on Rails - EcosystemBe Happy With Ruby on Rails - Ecosystem
Be Happy With Ruby on Rails - Ecosystem
 
May The Nodejs Be With You
May The Nodejs Be With YouMay The Nodejs Be With You
May The Nodejs Be With You
 
Integrating Browserify with Sprockets
Integrating Browserify with SprocketsIntegrating Browserify with Sprockets
Integrating Browserify with Sprockets
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Bundler is the Best

  • 1. Bundle! is th" Best! BADCamp 2014 @dead_arm
  • 3. Manage the rubygems you need… “Bundler makes sure Ruby applications run the same code on every machine” From https://github.com/bundler/bundler
  • 4. and their dependencies! “and Bundler makes it easy to make sure that your application has the dependencies it needs to start up and run without errors.” From http://bundler.io/
  • 5. These are a few of my favorite things! http://bplusmovieblog.files.wordpress.com/2013/10/the-sound-of-music-25.png
  • 6. What can Bundle! do fo! you?
  • 7. If you are... On" developer, working on on" project On" developer, working on man# projects On! of man" developers, working on on! project On! of man" developers, working on man" projects
  • 8. Best Practices Create one bundle per theme Add gems to the Gemfile, not the Gemfile.lock Include ALL the gems you are using on the theme in the bundle
  • 9. Best Practices Specify the version of the gem if you know which one you need, otherwise you can let Bundler handle it Update gems using Bundler, not manually Once you have the bundle set up, use it!
  • 10. Recommendations State “require/bundler” in config.rb or set up a bash alias so that you don’t have to type “bundle exec…” Use “chruby” to manage your system’s ruby version (https://github.com/postmodern/chruby) Add the ruby version your gems use to your Gemfile
  • 11. What d$s it loo% lik"?
  • 12. config.rb # Require Rubygems and Bundler require 'rubygems' require 'bundler/setup' # Require Sass and Compass require 'sass' require 'compass' # Require additional gems require 'breakpoint' require 'fontcustom' # Set this to the root of your project when deployed: http_path = '/' css_dir = 'css' sass_dir = 'sass' fonts_dir = 'fonts' images_dir = 'images' javascripts_dir = 'js' # Enable relative paths to assets relative_assets = true # Disable debugging comments line_comments = false # Indented syntax preferred_syntax = :sass # Add cache buster asset_cache_buster :none
  • 13. Gemfile # Gemfile source "https://rubygems.org" ruby "2.0.0" gem "sass", "~> 3.3.0.rc.2" gem "compass", "~> 1.0.0.alpha.13" gem "breakpoint", "~> 2.4.0" gem "fontcustom", "~> 1.3.3"
  • 14. Gemfile.lock GEM remote: https://rubygems.org/ specs: breakpoint (2.4.0) compass (~> 1.0.0.alpha.13) sass (~> 3.3.0.rc.2) sassy-­‐maps (< 1.0.0) chunky_png (1.2.9) compass (1.0.0.alpha.17) chunky_png (~> 1.2) compass-­‐core (~> 1.0.0.alpha.16) compass-­‐import-­‐once (~> 1.0.1) json listen (~> 1.1.0) sass (~> 3.3.0.rc.1) compass-­‐core (1.0.0.alpha.16) multi_json (~> 1.0) sass (>= 3.3.rc.1) compass-­‐import-­‐once (1.0.1) ffi (1.9.3) fontcustom (1.3.3) json (~> 1.4) listen (~> 1.0) thor (~> 0.14) json (1.8.1) listen (1.1.6) rb-­‐fsevent (>= 0.9.3) rb-­‐inotify (>= 0.9) rb-­‐kqueue (>= 0.2) multi_json (1.8.2) rb-­‐fsevent (0.9.3) rb-­‐inotify (0.9.3) ffi (>= 0.5.0) rb-­‐kqueue (0.2.0) ffi (>= 0.5.0) sass (3.3.0.rc.2) listen (~> 1.1.0) sassy-­‐maps (0.3.1) compass (~> 1.0.0.alpha.13) sass (~> 3.3.0.rc.2) thor (0.19.1) PLATFORMS ruby DEPENDENCIES breakpoint (~> 2.4.0) compass (~> 1.0.0.alpha.13) fontcustom (~> 1.3.3) sass (~> 3.3.0.rc.2)
  • 15. Than# You BADCamp 2014 @dead_arm

Editor's Notes

  1. Bundler is a gem to manage gems. It’s a dependency manager so to speak, not a package manager. You may be thinking that it is similar to composer for PHP, and Composer is “strongly inspired by node&amp;apos;s npm and ruby&amp;apos;s bundler”.
  2. Bundler tracks the theme&amp;apos;s code and the rubygems it needs to run, so that a theme will always have the exact gems that it needs to compile.
  3. It does this by managing the gems that the application depends on. Given a list of gems, it can automatically download and install those gems, as well as any other gems needed by the gems that are listed. Before installing gems, it checks the versions of every gem to make sure that they are compatible, and can all be loaded at the same time. After the gems have been installed, Bundler can help you update some or all of them when new versions become available. Finally, it records the exact versions that have been installed, so that others can install the exact same gems.
  4. Well documented Well supported It helps me do my work and doesn’t get in my way
  5. Rubygem versions and their dependencies on other gems are a pain to manage. This becomes more complex when you are working on multiple projects simultaneously that don’t necessarily require the same gems or the same version of a rubygem. This is the nature of web development in it’s current form. We have very little control no matter what we do, so it’s nice to have some tools that alleviate pain points What happens if you get a new computer, or you want to update your version of Ruby? What about if you are using a Mac and your new themer is going to be on a PC? What if a project stalls, and you need to come back to it in 6 months, or if you launched a project and then get rehired later to do more work after time has passed? If you are using gems in your theme, even it it is just sass and compass, you could be using Bundler. You already have the dependency on Ruby, and you probably aren’t going to move away from Sass if you are already using it so let Bundler help you out.
  6. If you or your team members work if you work with contractors, temps, people jumping on and off projects because of resourcing. Case in point: projects stall, people leave, and hand-offs often don’t include robust documentation. Using Bundler is a great practice if you aren’t going to be working on a project forever and someone else will have to pick up where you left off, if you are working on one legacy project and one bleeding edge project, or if you frequently come back to projects after not working on them for some amount of time. One dev working on one project If it is for a client, they might have someone else work on it in the future, and that someone will love you, if they are already ok with the Ruby dependency, that you saved them time. They can get right to work by installing the bundle included. Can’t tell what the future holds, you may be working on another project soon One dev working on many projects Switching back and forth, want to keep your gem environment tidy. You can have local gems on your system, but may not be using those on a project, and what One of Many devs working on one project You might need to work with contractors, interns, a new hire, etc. I’m one person working on one project, but other devs who don’t necessarily work on the theme may need to. We don’t compile on the server, so when our team lead does a release, he merges branches, of the theme, and then recompiles, so he needs the bundle. Many devs working on many projects All of the above would apply, and I think this scenario will benefit the most by starting to use bundler
  7. The bundle install command always does a conservative update, refusing to update gems (or their dependencies) that you have not explicitly changed in the Gemfile. Bundle update will update every gem in the Gemfile to the latest possible versions There are some cases where you would want to update a Gem Without Modifying the Gemfile, but you would still use bundler to do that
  8. Three main things add require &amp;apos;bundler/setup&amp;apos; it to your config.rb One-time things Need to install bundler gem once with “gem install bundler” Then create your bundle with a Gemfile, then run bundle install and a Gemfile.lock is created Include those new files in to source control Maintenance Going forward add, remove, or update gems in the Gemfile, and then run bundle install after you have made changes
  9. Current gemfile It includes: the source of where I went to get the gems from The ruby version, so that If the Gemfile is loaded on a different Ruby version, Bundler will raise an exception with an explanation. The gems I use, with version numbers. The tilda arrow specifier means I want to use the version that is greater than or equal to the version specified, but less than the next release.
  10. After creating or changing my Gemfile, I run bundle install, and this is my Gemfile.lock that is generated by bundler.