Docs header transparent bg

What's New in each Release

What's New in v1.2

In this section, you'll find the major features introduced in the release. All the changes are documented in the Bundler 1.2 CHANGELOG. CHANGELOG

Specifying a Ruby Version

You can now specify the version of Ruby in the Gemfile like the following:
ruby '1.9.3'

That line declares that this application has a dependency on the Ruby VM that is ABI-compatible with 1.9.3. If the version check does not match, Bundler will raise an exception. This will ensure the running code matches. You can be more specific with the :engine and :engine_version options.
ruby '1.9.3', :engine => 'jruby', :engine_version => '1.6.7'
Learn More: Ruby Directive

Package :git and :path Dependencies

The bundle package command can also package :git and :path dependencies besides .gem files. This needs to be explicitly enabled via the --all option. Once used, the --all option will be remembered.
Learn More: bundle pack

Local Git Repos

Now when developing against a remote git repository, you can use a local git repo and keep the remote version for deployment. You can do this by setting a local git override:
bundle config local.GEM_NAME /path/to/local/git/repository

For example, in order to use a local Rack repository, a developer could call:
bundle config local.rack ~/Work/git/rack
and in your Gemfile you would set:
gem 'rack', :github => 'rack/rack', :branch => 'master'
You'll need to reference a git branch, since Bundler will do checks to ensure you don't work with invalid references. If the branch specified in the Gemfile and the current branch in the local git repository do not match, Bundler will abort. This ensures that a developer is always working against the correct branches, and prevents accidental locking to a different branch.
Learn More: Git