In your Gemfile, add the following:
gem 'example', :git => 'git://github.com/example.git'
You can also add ref, branch and tag options,
For example if you want to download from a particular branch:
gem 'example', :git => "git://github.com/example.git", :branch => "my-branch"
Then run:
bundle install