You can now specify the version of Ruby in the
Gemfile like 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'
Learn More: bundle pack
bundle package command can also package
:path dependencies besides
.gem files. This needs to be explicitly enabled
--all option. Once used, the
--all option will be remembered.
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
Learn More: Git
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.