Skip to content

Instantly share code, notes, and snippets.

@andrewsardone
Created November 2, 2011 19:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewsardone/1334566 to your computer and use it in GitHub Desktop.
Save andrewsardone/1334566 to your computer and use it in GitHub Desktop.
A quick cheat sheet for using Bundler

Bundler project setup

Create a Gemfile at root of your project

source :rubygems
gem "jekyll"

Install gems via bundler to a local vendor directory:

bundle install --path vendor/bundle

Create binary stubs so you can use bin/command instead of bundle exec

bundle install --binstubs

Configure git to work with bundler:

echo "\n# Bundler\n.bundle\nvendor/bundle/ruby" >> .gitignore
git add Gemfile Gemfile.lock

Be sure to use bin/command for anything that was installed by bundler, or just have bin on your $PATH

Additional RubyMotion setup

In your RubyMotion project's Rakefile, be sure to require bundler:

# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'
require 'bundler'
Bundler.require

Motion::Project::App.setup do |app|
# …

Cribbed from Andrew Carter's Modern Ruby Development and ThunderBolt Labs' Using Bundler With Rubymotion [sic].

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