I am interested in
$ gem install bundler
source 'https://rubygems.org' gem 'nokogiri' gem 'rack', '~>1.1' gem 'rspec', :require => 'spec'
$ bundle install $ git add Gemfile Gemfile.lock
require 'rubygems' require 'bundler/setup' # require your gems as usual require 'nokogiri'
$ bundle exec rspec spec/models
In some cases, running executables without
bundle exec may
work, if the executable happens to be installed in your system and does
not pull in any gems that conflict with your bundle.
However, this is unreliable and is the source of considerable pain. Even if it looks like it works, it may not work in the future or on another machine.
$ bundle install --binstubs $ bin/rspec spec/models
binare scoped to the bundle and will always work
Using Bundler with Rails
Checking Out an Application With a Gemfile for Development
$ bundle install
Updating Your Dependencies
# change gem 'nokogiri', '1.4.2' # to gem 'nokogiri', '1.4.3'
$ bundle install
After making a change to your
Gemfile, the next
bundle install will try to update the gems in your snapshot
Gemfile.lock) without forcing an update to any of the
other gems in your Gemfile.
This will usually work for simple dependencies, like
sqlite3. On the other hand,
updating Rails will usually require an update to some other component,
because of the amount of dependencies it has.
$ bundle update rails
$ bundle update
$ bundle outdated nokogiri
Check for newer pre-release versions:
bundle outdated nokogiri --pre
Or leave off the gem name to check for newer versions of all gems:
$ bundle outdated
Deploying Your Application
$ bundle install --deployment
--deploymentflag turns on defaults that are appropriate for a deployment environment. Gems are installed to
Gemfile.lockmust be checked in and up to date before Bundler is run.
$ bundle package
group :development do gem 'wirble' end
.gemspecat its root. Bundler will make the executables available to
bundle execand compile C extensions
gem 'nokogiri', :git => 'https://github.com/tenderlove/nokogiri.git'
gem 'nokogiri', :path => '~/Code/nokogiri'
$ bundle install --path vendor
$ bundle install --standalone