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
Gemfilelike the following:
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
Learn More: Ruby Directive
ruby '1.9.3', :engine => 'jruby', :engine_version => '1.6.7'
TheLearn More: bundle pack
bundle packagecommand can also package
.gemfiles. This needs to be explicitly enabled via the
--alloption. Once used, the
--alloption will be remembered.
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
Gemfileyou 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 theLearn More: Git
Gemfileand 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.