Skip to content

Instantly share code, notes, and snippets.

@mazuhl
Created April 10, 2012 10:35
Show Gist options
  • Save mazuhl/2350243 to your computer and use it in GitHub Desktop.
Save mazuhl/2350243 to your computer and use it in GitHub Desktop.
Check if we need to bundle install
# this is from a Zach Holman slide
require 'digest/md5'
md5 = Digest::MD5.new()
md5 << File.read('Gemfile')
checksum = md5.hexdigest
installed = File.read('.bundle/checksum').strip
@mazuhl
Copy link
Author

mazuhl commented Apr 10, 2012

Once you've got the checksum of the current Gemfile and the installed gems Gemfile you can run bundle install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment