Local Git Repos

Bundler also allows you to work against a git repository locally instead of using the remote version. This can be achieved by setting up a local override:

bundle config local.GEM_NAME /path/to/local/git/repository

For example, in order to use a local sinatra repository, a developer could call:

[~/sinatra/sinatra-streaming/intro-streaming(master)]$ bundle config local.sinatra /Users/casiano/local/src/ruby/sinatra/sinatra-src

[~/sinatra/sinatra-streaming/intro-streaming(master)]$ bundle update
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using columnize 0.8.9
Using debugger-linecache 1.2.0
Using slop 3.6.0
Using byebug 3.5.1
Using coderay 1.1.0
Using method_source 0.8.2
Using pry 0.10.1
Using pry-byebug 2.0.0
Using rack 1.5.2
Using rack-protection 1.5.3
Using tilt 2.0.1 (was 1.4.1)
Using sinatra 1.4.5 from git://github.com/sinatra/sinatra.git (at /Users/casiano/local/src/ruby/sinatra/sinatra-src)
Using bundler 1.6.2
Your bundle is updated!

[~/sinatra/sinatra-streaming/intro-streaming(master)]$ bundle show sinatra
/Users/casiano/local/src/ruby/sinatra/sinatra-src



Casiano Rodriguez León 2015-01-07