Often we need to use a gem from local file system while developing it. Bundle provides local gem overrides targeting this.
Assume my Gemfile
is something like:
# Gemfile
gem 'fuelzee', git: '[email protected]:Fuelzee/fuelzee-ruby.git'
branch: 'master'
If I want to use a local gem:
$ bundle config local.fuelzee ~/workspace/work/fuelzee/fuelzee-ruby/
$ bundle
Fetching gem metadata from https://rubygems.org/........
Using fuelzee (0.0.1) from https://github.com/Fuelzee/fuelzee-ruby.git (at /Users/guiocavalcanti/workspace/work/fuelzee/fuelzee-ruby)
If I want to switch back:
$ bundle config --delete local.fuelzee
$ bundle
Fetching [email protected]:Fuelzee/fuelzee-ruby.git
Cloning into bare repository '/Users/guiocavalcanti/.rvm/gems/ruby-2.0.0-p353/cache/bundler/git/fuelzee-ruby-050d51c08e595629d27c034c46aa6ce53ba12a7b'