bundler 1.0.0.rc.5 → 1.0.0.rc.6
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bundler might be problematic. Click here for more details.
- data/CHANGELOG.md +18 -0
- data/ISSUES.md +30 -0
- data/README.md +3 -64
- data/lib/bundler.rb +33 -5
- data/lib/bundler/capistrano.rb +26 -5
- data/lib/bundler/cli.rb +41 -1
- data/lib/bundler/dsl.rb +1 -0
- data/lib/bundler/gem_helper.rb +18 -26
- data/lib/bundler/man/bundle +96 -0
- data/lib/bundler/man/bundle-config +92 -0
- data/lib/bundler/man/bundle-config.txt +108 -0
- data/lib/bundler/man/bundle-exec +107 -0
- data/lib/bundler/man/bundle-exec.txt +115 -0
- data/lib/bundler/man/bundle-install +280 -0
- data/lib/bundler/man/bundle-install.txt +331 -0
- data/lib/bundler/man/bundle-package +49 -0
- data/lib/bundler/man/bundle-package.txt +66 -0
- data/lib/bundler/man/bundle-update +202 -0
- data/lib/bundler/man/bundle-update.txt +207 -0
- data/lib/bundler/man/bundle.txt +83 -0
- data/lib/bundler/man/gemfile.5 +343 -0
- data/lib/bundler/man/gemfile.5.txt +317 -0
- data/lib/bundler/source.rb +4 -25
- data/lib/bundler/templates/Executable +1 -1
- data/lib/bundler/templates/Gemfile +2 -2
- data/lib/bundler/templates/newgem/Gemfile.tt +1 -1
- data/lib/bundler/templates/newgem/Rakefile.tt +1 -1
- data/lib/bundler/templates/newgem/gitignore.tt +2 -1
- data/lib/bundler/templates/newgem/lib/newgem.rb.tt +7 -3
- data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +7 -3
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +3 -4
- data/lib/bundler/vendor/thor/parser/options.rb +9 -1
- data/lib/bundler/vendor/thor/shell.rb +1 -1
- data/lib/bundler/vendor/thor/util.rb +2 -2
- data/lib/bundler/version.rb +1 -1
- metadata +22 -48
- data/TODO.md +0 -13
- data/bin/bundle.compiled.rbc +0 -486
- data/lib/bundler.rbc +0 -5691
- data/lib/bundler/cli.rbc +0 -10105
- data/lib/bundler/definition.rbc +0 -9423
- data/lib/bundler/dependency.rbc +0 -2650
- data/lib/bundler/dsl.rbc +0 -5861
- data/lib/bundler/environment.rbc +0 -923
- data/lib/bundler/index.rbc +0 -0
- data/lib/bundler/installer.rbc +0 -1634
- data/lib/bundler/lazy_specification.rbc +0 -1721
- data/lib/bundler/lockfile_parser.rbc +0 -2524
- data/lib/bundler/remote_specification.rbc +0 -1058
- data/lib/bundler/resolver.rbc +0 -9067
- data/lib/bundler/rubygems_ext.rbc +0 -4490
- data/lib/bundler/runtime.rbc +0 -3350
- data/lib/bundler/settings.rbc +0 -2951
- data/lib/bundler/shared_helpers.rbc +0 -3614
- data/lib/bundler/source.rbc +0 -15697
- data/lib/bundler/spec_set.rbc +0 -3394
- data/lib/bundler/ui.rbc +0 -1407
- data/lib/bundler/vendor/thor.rbc +0 -5037
- data/lib/bundler/vendor/thor/actions.rbc +0 -4782
- data/lib/bundler/vendor/thor/actions/create_file.rbc +0 -1672
- data/lib/bundler/vendor/thor/actions/directory.rbc +0 -1477
- data/lib/bundler/vendor/thor/actions/empty_directory.rbc +0 -1773
- data/lib/bundler/vendor/thor/actions/file_manipulation.rbc +0 -2877
- data/lib/bundler/vendor/thor/actions/inject_into_file.rbc +0 -1764
- data/lib/bundler/vendor/thor/base.rbc +0 -7795
- data/lib/bundler/vendor/thor/core_ext/file_binary_read.rbc +0 -271
- data/lib/bundler/vendor/thor/core_ext/hash_with_indifferent_access.rbc +0 -1395
- data/lib/bundler/vendor/thor/core_ext/ordered_hash.rbc +0 -1862
- data/lib/bundler/vendor/thor/error.rbc +0 -240
- data/lib/bundler/vendor/thor/invocation.rbc +0 -2050
- data/lib/bundler/vendor/thor/parser.rbc +0 -101
- data/lib/bundler/vendor/thor/parser/argument.rbc +0 -1445
- data/lib/bundler/vendor/thor/parser/arguments.rbc +0 -2661
- data/lib/bundler/vendor/thor/parser/option.rbc +0 -2007
- data/lib/bundler/vendor/thor/parser/options.rbc +0 -3429
- data/lib/bundler/vendor/thor/shell.rbc +0 -1486
- data/lib/bundler/vendor/thor/shell/basic.rbc +0 -4872
- data/lib/bundler/vendor/thor/shell/color.rbc +0 -1659
- data/lib/bundler/vendor/thor/task.rbc +0 -2900
- data/lib/bundler/vendor/thor/util.rbc +0 -3196
- data/lib/bundler/version.rbc +0 -175
@@ -0,0 +1,207 @@
|
|
1
|
+
BUNDLE-UPDATE(1) BUNDLE-UPDATE(1)
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
NAME
|
6
|
+
bundle-update - Update your gems to the latest available versions
|
7
|
+
|
8
|
+
SYNOPSIS
|
9
|
+
bundle update *gems [--source=NAME]
|
10
|
+
|
11
|
+
DESCRIPTION
|
12
|
+
Update the gems specified (all gems, if none are specified), ignoring
|
13
|
+
the previously installed gems specified in the Gemfile.lock. In gen-
|
14
|
+
eral, you should use bundle install(1) bundle-install.1.html to install
|
15
|
+
the same exact gems and versions across machines.
|
16
|
+
|
17
|
+
You would use bundle update to explicitly update the version of a gem.
|
18
|
+
|
19
|
+
OPTIONS
|
20
|
+
--source=<name>
|
21
|
+
The name of a :git or :path source used in the Gemfile(5). For
|
22
|
+
instance, with a :git source of
|
23
|
+
http://github.com/rails/rails.git, you would call bundle update
|
24
|
+
--source rails
|
25
|
+
|
26
|
+
UPDATING ALL GEMS
|
27
|
+
If you run bundle update with no parameters, bundler will ignore any
|
28
|
+
previously installed gems and resolve all dependencies again based on
|
29
|
+
the latest versions of all gems available in the sources.
|
30
|
+
|
31
|
+
Consider the following Gemfile(5):
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
source "http://rubygems.org"
|
36
|
+
|
37
|
+
gem "rails", "3.0.0.rc"
|
38
|
+
gem "nokogiri"
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
When you run bundle install(1) bundle-install.1.html the first time,
|
43
|
+
bundler will resolve all of the dependencies, all the way down, and
|
44
|
+
install what you need:
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
Fetching source index for http://rubygems.org/
|
49
|
+
Installing rake (0.8.7)
|
50
|
+
Installing abstract (1.0.0)
|
51
|
+
Installing activesupport (3.0.0.rc)
|
52
|
+
Installing builder (2.1.2)
|
53
|
+
Installing i18n (0.4.1)
|
54
|
+
Installing activemodel (3.0.0.rc)
|
55
|
+
Installing erubis (2.6.6)
|
56
|
+
Installing rack (1.2.1)
|
57
|
+
Installing rack-mount (0.6.9)
|
58
|
+
Installing rack-test (0.5.4)
|
59
|
+
Installing tzinfo (0.3.22)
|
60
|
+
Installing actionpack (3.0.0.rc)
|
61
|
+
Installing mime-types (1.16)
|
62
|
+
Installing polyglot (0.3.1)
|
63
|
+
Installing treetop (1.4.8)
|
64
|
+
Installing mail (2.2.5)
|
65
|
+
Installing actionmailer (3.0.0.rc)
|
66
|
+
Installing arel (0.4.0)
|
67
|
+
Installing activerecord (3.0.0.rc)
|
68
|
+
Installing activeresource (3.0.0.rc)
|
69
|
+
Installing bundler (1.0.0.rc.3)
|
70
|
+
Installing nokogiri (1.4.3.1) with native extensions
|
71
|
+
Installing thor (0.14.0)
|
72
|
+
Installing railties (3.0.0.rc)
|
73
|
+
Installing rails (3.0.0.rc)
|
74
|
+
|
75
|
+
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
As you can see, even though you have just two gems in the Gemfile(5),
|
80
|
+
your application actually needs 25 different gems in order to run.
|
81
|
+
Bundler remembers the exact versions it installed in Gemfile.lock. The
|
82
|
+
next time you run bundle install(1) bundle-install.1.html, bundler
|
83
|
+
skips the dependency resolution and installs the same gems as it
|
84
|
+
installed last time.
|
85
|
+
|
86
|
+
After checking in the Gemfile.lock into version control and cloning it
|
87
|
+
on another machine, running bundle install(1) bundle-install.1.html
|
88
|
+
will still install the gems that you installed last time. You don't
|
89
|
+
need to worry that a new release of erubis or mail changes the gems you
|
90
|
+
use.
|
91
|
+
|
92
|
+
However, from time to time, you might want to update the gems you are
|
93
|
+
using to the newest versions that still match the gems in your Gem-
|
94
|
+
file(5).
|
95
|
+
|
96
|
+
To do this, run bundle update, which will ignore the Gemfile.lock, and
|
97
|
+
resolve all the dependencies again. Keep in mind that this process can
|
98
|
+
result in a significantly different set of the 25 gems, based on the
|
99
|
+
requirements of new gems that the gem authors released since the last
|
100
|
+
time you ran bundle update.
|
101
|
+
|
102
|
+
UPDATING A LIST OF GEMS
|
103
|
+
Sometimes, you want to update a single gem in the Gemfile(5), and leave
|
104
|
+
the rest of the gems that you specified locked to the versions in the
|
105
|
+
Gemfile.lock.
|
106
|
+
|
107
|
+
For instance, in the scenario above, imagine that nokogiri releases
|
108
|
+
version 1.4.4, and you want to update it without updating Rails and all
|
109
|
+
of its dependencies. To do this, run bundle update nokogiri.
|
110
|
+
|
111
|
+
Bundler will update nokogiri and any of its dependencies, but leave
|
112
|
+
alone Rails and its dependencies.
|
113
|
+
|
114
|
+
OVERLAPPING DEPENDENCIES
|
115
|
+
Sometimes, multiple gems declared in your Gemfile(5) are satisfied by
|
116
|
+
the same second-level dependency. For instance, consider the case of
|
117
|
+
thin and rack-perftools-profiler.
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
source "http://rubygems.org"
|
122
|
+
|
123
|
+
gem "thin"
|
124
|
+
gem "rack-perftools-profiler"
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
The thin gem depends on rack >= 1.0, while rack-perftools-profiler
|
129
|
+
depends on rack ~> 1.0. If you run bundle install, you get:
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
Fetching source index for http://rubygems.org/
|
134
|
+
Installing daemons (1.1.0)
|
135
|
+
Installing eventmachine (0.12.10) with native extensions
|
136
|
+
Installing open4 (1.0.1)
|
137
|
+
Installing perftools.rb (0.4.7) with native extensions
|
138
|
+
Installing rack (1.2.1)
|
139
|
+
Installing rack-perftools_profiler (0.0.2)
|
140
|
+
Installing thin (1.2.7) with native extensions
|
141
|
+
Using bundler (1.0.0.rc.3)
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
In this case, the two gems have their own set of dependencies, but they
|
146
|
+
share rack in common. If you run bundle update thin, bundler will
|
147
|
+
update daemons, eventmachine and rack, which are dependencies of thin,
|
148
|
+
but not open4 or perftools.rb, which are dependencies of
|
149
|
+
rack-perftools_profiler. Note that bundle update thin will update rack
|
150
|
+
even though it's also a dependency of rack-perftools_profiler.
|
151
|
+
|
152
|
+
In short, when you update a gem using bundle update, bundler will
|
153
|
+
update all dependencies of that gem, including those that are also
|
154
|
+
dependencies of another gem.
|
155
|
+
|
156
|
+
In this scenario, updating the thin version manually in the Gemfile(5),
|
157
|
+
and then running bundle install(1) bundle-install.1.html will only
|
158
|
+
update daemons and eventmachine, but not rack. For more information,
|
159
|
+
see the CONSERVATIVE UPDATING section of bundle install(1) bun-
|
160
|
+
dle-install.1.html.
|
161
|
+
|
162
|
+
RECOMMENDED WORKFLOW
|
163
|
+
In general, when working with an application managed with bundler, you
|
164
|
+
should use the following workflow:
|
165
|
+
|
166
|
+
o After you create your Gemfile(5) for the first time, run
|
167
|
+
|
168
|
+
$ bundle install
|
169
|
+
|
170
|
+
o Check the resulting Gemfile.lock into version control
|
171
|
+
|
172
|
+
$ git add Gemfile.lock
|
173
|
+
|
174
|
+
o When checking out this repository on another development machine,
|
175
|
+
run
|
176
|
+
|
177
|
+
$ bundle install
|
178
|
+
|
179
|
+
o When checking out this repository on a deployment machine, run
|
180
|
+
|
181
|
+
$ bundle install --deployment
|
182
|
+
|
183
|
+
o After changing the Gemfile(5) to reflect a new or update depen-
|
184
|
+
dency, run
|
185
|
+
|
186
|
+
$ bundle install
|
187
|
+
|
188
|
+
o Make sure to check the updated Gemfile.lock into version control
|
189
|
+
|
190
|
+
$ git add Gemfile.lock
|
191
|
+
|
192
|
+
o If bundle install(1) bundle-install.1.html reports a conflict, man-
|
193
|
+
ually update the specific gems that you changed in the Gemfile(5)
|
194
|
+
|
195
|
+
$ bundle update rails thin
|
196
|
+
|
197
|
+
o If you want to update all the gems to the latest possible versions
|
198
|
+
that still match the gems listed in the Gemfile(5), run
|
199
|
+
|
200
|
+
$ bundle update
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
August 2010 BUNDLE-UPDATE(1)
|
@@ -0,0 +1,83 @@
|
|
1
|
+
BUNDLE(1) BUNDLE(1)
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
NAME
|
6
|
+
bundle - Ruby Dependency Management
|
7
|
+
|
8
|
+
SYNOPSIS
|
9
|
+
bundle [--no-color] COMMAND [ARGS]
|
10
|
+
|
11
|
+
DESCRIPTION
|
12
|
+
Bundler manages an application's dependencies through its entire life
|
13
|
+
across many machines systematically and repeatably.
|
14
|
+
|
15
|
+
See the bundler website http://gembundler.com for information on get-
|
16
|
+
ting started, and Gemfile(5) for more information on the Gemfile for-
|
17
|
+
mat.
|
18
|
+
|
19
|
+
OPTIONS
|
20
|
+
--no-color
|
21
|
+
Prints all output without color
|
22
|
+
|
23
|
+
BUNDLE COMMANDS
|
24
|
+
We divide bundle subcommands into primary commands and utilities.
|
25
|
+
|
26
|
+
PRIMARY COMMANDS
|
27
|
+
bundle install(1) bundle-install.1.html
|
28
|
+
Install the gems specified by the Gemfile or Gemfile.lock
|
29
|
+
|
30
|
+
bundle update(1) bundle-update.1.html
|
31
|
+
Update dependencies to their latest versions
|
32
|
+
|
33
|
+
bundle package(1) bundle-package.1.html
|
34
|
+
Package the .gem files required by your application into the
|
35
|
+
vendor/cache directory
|
36
|
+
|
37
|
+
bundle exec(1) bundle-exec.1.html
|
38
|
+
Execute a script in the context of the current bundle
|
39
|
+
|
40
|
+
bundle config(1) bundle-config.1.html
|
41
|
+
Specify and read configuration options for bundler
|
42
|
+
|
43
|
+
UTILITIES
|
44
|
+
bundle check(1)
|
45
|
+
Determine whether the requirements for your application are
|
46
|
+
installed and available to bundler
|
47
|
+
|
48
|
+
bundle list(1)
|
49
|
+
Show all of the gems in the current bundle
|
50
|
+
|
51
|
+
bundle show(1)
|
52
|
+
Show the source location of a particular gem in the bundle
|
53
|
+
|
54
|
+
bundle console(1)
|
55
|
+
Start an IRB session in the context of the current bundle
|
56
|
+
|
57
|
+
bundle open(1)
|
58
|
+
Open an installed gem in the editor
|
59
|
+
|
60
|
+
bundle viz(1)
|
61
|
+
Generate a visual representation of your dependencies
|
62
|
+
|
63
|
+
bundle init(1)
|
64
|
+
Generate a simple Gemfile, placed in the current directory
|
65
|
+
|
66
|
+
bundle gem(1)
|
67
|
+
Create a simple gem, suitable for development with bundler
|
68
|
+
|
69
|
+
OBSOLETE
|
70
|
+
These commands are obsolete and should no longer be used
|
71
|
+
|
72
|
+
o bundle lock(1)
|
73
|
+
|
74
|
+
o bundle unlock(1)
|
75
|
+
|
76
|
+
o bundle cache(1)
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
August 2010 BUNDLE(1)
|
@@ -0,0 +1,343 @@
|
|
1
|
+
.\" generated with Ronn/v0.7.3
|
2
|
+
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
|
+
.
|
4
|
+
.TH "GEMFILE" "5" "August 2010" "" ""
|
5
|
+
.
|
6
|
+
.SH "NAME"
|
7
|
+
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
|
8
|
+
.
|
9
|
+
.SH "SYNOPSIS"
|
10
|
+
A \fBGemfile\fR describes the gem dependencies required to execute associated Ruby code\.
|
11
|
+
.
|
12
|
+
.P
|
13
|
+
Place the \fBGemfile\fR in the root of the directory containing the associated code\. For instance, in a Rails application, place the \fBGemfile\fR in the same directory as the \fBRakefile\fR\.
|
14
|
+
.
|
15
|
+
.SH "SYNTAX"
|
16
|
+
A \fBGemfile\fR is evaluated as Ruby code, in a context which makes available a number of methods used to describe the gem requirements\.
|
17
|
+
.
|
18
|
+
.SH "SOURCES (#source)"
|
19
|
+
At the top of the \fBGemfile\fR, add one line for each \fBRubygems\fR source that might contain the gems listed in the \fBGemfile\fR\.
|
20
|
+
.
|
21
|
+
.IP "" 4
|
22
|
+
.
|
23
|
+
.nf
|
24
|
+
|
25
|
+
source "http://rubygems\.org"
|
26
|
+
source "http://gems\.github\.com"
|
27
|
+
.
|
28
|
+
.fi
|
29
|
+
.
|
30
|
+
.IP "" 0
|
31
|
+
.
|
32
|
+
.P
|
33
|
+
Each of these _source_s \fBMUST\fR be a valid Rubygems repository\.
|
34
|
+
.
|
35
|
+
.SH "GEMS (#gem)"
|
36
|
+
Specify gem requirements using the \fBgem\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
|
37
|
+
.
|
38
|
+
.SS "NAME (required)"
|
39
|
+
For each gem requirement, list a single \fIgem\fR line\.
|
40
|
+
.
|
41
|
+
.IP "" 4
|
42
|
+
.
|
43
|
+
.nf
|
44
|
+
|
45
|
+
gem "nokogiri"
|
46
|
+
.
|
47
|
+
.fi
|
48
|
+
.
|
49
|
+
.IP "" 0
|
50
|
+
.
|
51
|
+
.SS "VERSION"
|
52
|
+
Each \fIgem\fR \fBMAY\fR have one or more version specifiers\.
|
53
|
+
.
|
54
|
+
.IP "" 4
|
55
|
+
.
|
56
|
+
.nf
|
57
|
+
|
58
|
+
gem "nokogiri", ">= 1\.4\.2"
|
59
|
+
gem "RedCloth", ">= 4\.1\.0", "< 4\.2\.0"
|
60
|
+
.
|
61
|
+
.fi
|
62
|
+
.
|
63
|
+
.IP "" 0
|
64
|
+
.
|
65
|
+
.SS "REQUIRE AS (:require)"
|
66
|
+
Each \fIgem\fR \fBMAY\fR specify its main file, which should be used when autorequiring (\fBBundler\.require\fR)\.
|
67
|
+
.
|
68
|
+
.IP "" 4
|
69
|
+
.
|
70
|
+
.nf
|
71
|
+
|
72
|
+
gem "sqlite3\-ruby", :require => "sqlite3"
|
73
|
+
.
|
74
|
+
.fi
|
75
|
+
.
|
76
|
+
.IP "" 0
|
77
|
+
.
|
78
|
+
.P
|
79
|
+
This defaults to the name of the gem itself\. For instance, these are identical:
|
80
|
+
.
|
81
|
+
.IP "" 4
|
82
|
+
.
|
83
|
+
.nf
|
84
|
+
|
85
|
+
gem "nokogiri"
|
86
|
+
gem "nokogiri", :require => "nokogiri"
|
87
|
+
.
|
88
|
+
.fi
|
89
|
+
.
|
90
|
+
.IP "" 0
|
91
|
+
.
|
92
|
+
.SS "GROUPS (:group or :groups)"
|
93
|
+
Each \fIgem\fR \fBMAY\fR specify membership in one or more groups\. Any \fIgem\fR that does not specify membership in any group is placed in the \fBdefault\fR group\.
|
94
|
+
.
|
95
|
+
.IP "" 4
|
96
|
+
.
|
97
|
+
.nf
|
98
|
+
|
99
|
+
gem "rspec", :group => :test
|
100
|
+
gem "wirble", :groups => [:development, :test]
|
101
|
+
.
|
102
|
+
.fi
|
103
|
+
.
|
104
|
+
.IP "" 0
|
105
|
+
.
|
106
|
+
.P
|
107
|
+
The Bundler runtime allows its two main methods, \fBBundler\.setup\fR and \fBBundler\.require\fR, to limit their impact to particular groups\.
|
108
|
+
.
|
109
|
+
.IP "" 4
|
110
|
+
.
|
111
|
+
.nf
|
112
|
+
|
113
|
+
# setup adds gems to Ruby\'s load path
|
114
|
+
Bundler\.setup # defaults to all groups
|
115
|
+
require "bundler/setup" # same as Bundler\.setup
|
116
|
+
Bundler\.setup(:default) # only set up the _default_ group
|
117
|
+
Bundler\.setup(:test) # only set up the _test_ group (but `not` _default_)
|
118
|
+
Bundler\.setup(:default, :test) # set up the _default_ and _test_ groups, but no others
|
119
|
+
|
120
|
+
# require requires all of the gems in the specified groups
|
121
|
+
Bundler\.require # defaults to just the _default_ group
|
122
|
+
Bundler\.require(:default) # identical
|
123
|
+
Bundler\.require(:default, :test) # requires the _default_ and _test_ groups
|
124
|
+
Bundler\.require(:test) # requires just the _test_ group
|
125
|
+
.
|
126
|
+
.fi
|
127
|
+
.
|
128
|
+
.IP "" 0
|
129
|
+
.
|
130
|
+
.P
|
131
|
+
The Bundler CLI allows you to specify a list of groups whose gems \fBbundle install\fR should not install with the \fB\-\-without\fR option\. To specify multiple groups to ignore, specify a list of groups separated by spaces\.
|
132
|
+
.
|
133
|
+
.IP "" 4
|
134
|
+
.
|
135
|
+
.nf
|
136
|
+
|
137
|
+
bundle install \-\-without test
|
138
|
+
bundle install \-\-without development test
|
139
|
+
.
|
140
|
+
.fi
|
141
|
+
.
|
142
|
+
.IP "" 0
|
143
|
+
.
|
144
|
+
.P
|
145
|
+
After running \fBbundle install \-\-without test\fR, bundler will remember that you excluded the test group in the last installation\. The next time you run \fBbundle install\fR, without any \fB\-\-without option\fR, bundler will recall it\.
|
146
|
+
.
|
147
|
+
.P
|
148
|
+
Also, calling \fBBundler\.setup\fR with no parameters, or calling \fBrequire "bundler/setup"\fR will setup all groups except for the ones you excluded via \fB\-\-without\fR (since they are obviously not available)\.
|
149
|
+
.
|
150
|
+
.P
|
151
|
+
Note that on \fBbundle install\fR, bundler downloads and evaluates all gems, in order to create a single canonical list of all of the required gems and their dependencies\. This means that you cannot list different versions of the same gems in different groups\. For more details, see Understanding Bundler \fIhttp://gembundler\.com/v1\.0/understanding\.html\fR\.
|
152
|
+
.
|
153
|
+
.SS "PLATFORMS (:platforms)"
|
154
|
+
If a gem should only be used in a particular platform or set of platforms, you can specify them\. Platforms are essentially identical to groups, except that you do not need to use the \fB\-\-without\fR install\-time flag to exclude groups of gems for other platforms\.
|
155
|
+
.
|
156
|
+
.P
|
157
|
+
There are a number of \fBGemfile\fR platforms:
|
158
|
+
.
|
159
|
+
.TP
|
160
|
+
\fBruby\fR
|
161
|
+
C Ruby (MRI) or Rubinius, but \fBNOT\fR Windows
|
162
|
+
.
|
163
|
+
.TP
|
164
|
+
\fBruby_18\fR
|
165
|
+
\fIruby\fR \fBAND\fR version 1\.8
|
166
|
+
.
|
167
|
+
.TP
|
168
|
+
\fBruby_19\fR
|
169
|
+
\fIruby\fR \fBAND\fR version 1\.9
|
170
|
+
.
|
171
|
+
.TP
|
172
|
+
\fBmri\fR
|
173
|
+
Same as \fIruby\fR, but not Rubinius
|
174
|
+
.
|
175
|
+
.TP
|
176
|
+
\fBmri_18\fR
|
177
|
+
\fImri\fR \fBAND\fR version 1\.8
|
178
|
+
.
|
179
|
+
.TP
|
180
|
+
\fBmri_19\fR
|
181
|
+
\fImri\fR \fBAND\fR version 1\.9
|
182
|
+
.
|
183
|
+
.TP
|
184
|
+
\fBjruby\fR
|
185
|
+
JRuby
|
186
|
+
.
|
187
|
+
.TP
|
188
|
+
\fBmswin\fR
|
189
|
+
Windows
|
190
|
+
.
|
191
|
+
.P
|
192
|
+
As with groups, you can specify one or more platforms:
|
193
|
+
.
|
194
|
+
.IP "" 4
|
195
|
+
.
|
196
|
+
.nf
|
197
|
+
|
198
|
+
gem "weakling", :platforms => :jruby
|
199
|
+
gem "ruby\-debug", :platforms => :mri_18
|
200
|
+
gem "nokogiri", :platforms => [:mri_18, :jruby]
|
201
|
+
.
|
202
|
+
.fi
|
203
|
+
.
|
204
|
+
.IP "" 0
|
205
|
+
.
|
206
|
+
.P
|
207
|
+
All operations involving groups (\fBbundle install\fR, \fBBundler\.setup\fR, \fBBundler\.require\fR) behave exactly the same as if any groups not matching the current platform were explicitly excluded\.
|
208
|
+
.
|
209
|
+
.SS "GIT (:git)"
|
210
|
+
If necessary, you can specify that a gem is located at a particular git repository\. The repository can be public (\fBhttp://github\.com/rails/rails\.git\fR) or private (\fBgit@github\.com:rails/rails\.git\fR)\. If the repository is private, the user that you use to run \fBbundle install\fR \fBMUST\fR have the appropriate keys available in their \fB$HOME/\.ssh\fR\.
|
211
|
+
.
|
212
|
+
.P
|
213
|
+
Git repositories are specified using the \fB:git\fR parameter\. The \fBgroup\fR, \fBplatforms\fR, and \fBrequire\fR options are available and behave exactly the same as they would for a normal gem\.
|
214
|
+
.
|
215
|
+
.IP "" 4
|
216
|
+
.
|
217
|
+
.nf
|
218
|
+
|
219
|
+
gem "rails", :git => "git://github\.com/rails/rails\.git"
|
220
|
+
.
|
221
|
+
.fi
|
222
|
+
.
|
223
|
+
.IP "" 0
|
224
|
+
.
|
225
|
+
.P
|
226
|
+
A git repository \fBSHOULD\fR have at least one file, at the root of the directory containing the gem, with the extension \fB\.gemspec\fR\. This file \fBMUST\fR contain a valid gem specification, as expected by the \fBgem build\fR command\. It \fBMUST NOT\fR have any dependencies, other than on the files in the git repository itself and any built\-in functionality of Ruby or Rubygems\.
|
227
|
+
.
|
228
|
+
.P
|
229
|
+
If a git repository does not have a \fB\.gemspec\fR, bundler will attempt to create one, but it will not contain any dependencies, executables, or C extension compilation instructions\. As a result, it may fail to properly integrate into your application\.
|
230
|
+
.
|
231
|
+
.P
|
232
|
+
If a git repository does have a \fB\.gemspec\fR for the gem you attached it to, a version specifier, if provided, means that the git repository is only valid if the \fB\.gemspec\fR specifies a version matching the version specifier\. If not, bundler will print a warning\.
|
233
|
+
.
|
234
|
+
.IP "" 4
|
235
|
+
.
|
236
|
+
.nf
|
237
|
+
|
238
|
+
gem "rails", "2\.3\.8", :git => "git://github\.com/rails/rails\.git"
|
239
|
+
# bundle install will fail, because the \.gemspec in the rails
|
240
|
+
# repository\'s master branch specifies version 3\.0\.0
|
241
|
+
.
|
242
|
+
.fi
|
243
|
+
.
|
244
|
+
.IP "" 0
|
245
|
+
.
|
246
|
+
.P
|
247
|
+
If a git repository does \fBnot\fR have a \fB\.gemspec\fR for the gem you attached it to, a version specifier \fBMUST\fR be provided\. Bundler will use this version in the simple \fB\.gemspec\fR it creates\.
|
248
|
+
.
|
249
|
+
.P
|
250
|
+
Git repositories support a number of additional options\.
|
251
|
+
.
|
252
|
+
.TP
|
253
|
+
\fBbranch\fR, \fBtag\fR, and \fBref\fR
|
254
|
+
You \fBMUST\fR only specify at most one of these options\. The default is \fB:branch => "master"\fR
|
255
|
+
.
|
256
|
+
.TP
|
257
|
+
\fBsubmodules\fR
|
258
|
+
Specify \fB:submodules => true\fR to cause bundler to expand any submodules included in the git repository
|
259
|
+
.
|
260
|
+
.P
|
261
|
+
If a git repository contains multiple \fB\.gemspecs\fR, each \fB\.gemspec\fR represents a gem located at the same place in the file system as the \fB\.gemspec\fR\.
|
262
|
+
.
|
263
|
+
.IP "" 4
|
264
|
+
.
|
265
|
+
.nf
|
266
|
+
|
267
|
+
|~rails [git root]
|
268
|
+
| |\-rails\.gemspec [rails gem located here]
|
269
|
+
|~actionpack
|
270
|
+
| |\-actionpack\.gemspec [actionpack gem located here]
|
271
|
+
|~activesupport
|
272
|
+
| |\-activesupport\.gemspec [activesupport gem located here]
|
273
|
+
\.\.\.
|
274
|
+
.
|
275
|
+
.fi
|
276
|
+
.
|
277
|
+
.IP "" 0
|
278
|
+
.
|
279
|
+
.P
|
280
|
+
To install a gem located in a git repository, bundler changes to the directory containing the gemspec, runs \fBgem build name\.gemspec\fR and then installs the resulting gem\. The \fBgem build\fR command, which comes standard with Rubygems, evaluates the \fB\.gemspec\fR in the context of the directory in which it is located\.
|
281
|
+
.
|
282
|
+
.SS "PATH (:path)"
|
283
|
+
You can specify that a gem is located in a particular location on the file system\. Relative paths are resolved relative to the directory containing the \fBGemfile\fR\.
|
284
|
+
.
|
285
|
+
.P
|
286
|
+
Similar to the semantics of the \fB:git\fR option, the \fB:path\fR option requires that the directory in question either contains a \fB\.gemspec\fR for the gem, or that you specify an explicit version that bundler should use\.
|
287
|
+
.
|
288
|
+
.P
|
289
|
+
Unlike \fB:git\fR, bundler does not compile C extensions for gems specified as paths\.
|
290
|
+
.
|
291
|
+
.IP "" 4
|
292
|
+
.
|
293
|
+
.nf
|
294
|
+
|
295
|
+
gem "rails", :path => "vendor/rails"
|
296
|
+
.
|
297
|
+
.fi
|
298
|
+
.
|
299
|
+
.IP "" 0
|
300
|
+
.
|
301
|
+
.SH "BLOCK FORM OF GIT, PATH, GROUP and PLATFORMS"
|
302
|
+
The \fB:git\fR, \fB:path\fR, \fB:group\fR, and \fB:platforms\fR options may be applied to a group of gems by using block form\.
|
303
|
+
.
|
304
|
+
.IP "" 4
|
305
|
+
.
|
306
|
+
.nf
|
307
|
+
|
308
|
+
git "git://github\.com/rails/rails\.git" do
|
309
|
+
gem "activesupport"
|
310
|
+
gem "actionpack"
|
311
|
+
end
|
312
|
+
|
313
|
+
platforms :ruby do
|
314
|
+
gem "ruby\-debug"
|
315
|
+
gem "sqlite3\-ruby"
|
316
|
+
end
|
317
|
+
|
318
|
+
group :development do
|
319
|
+
gem "wirble"
|
320
|
+
gem "faker"
|
321
|
+
end
|
322
|
+
.
|
323
|
+
.fi
|
324
|
+
.
|
325
|
+
.IP "" 0
|
326
|
+
.
|
327
|
+
.P
|
328
|
+
In the case of the \fBgit\fR block form, the \fB:ref\fR, \fB:branch\fR, \fB:tag\fR, and \fB:submodules\fR options may be passed to the \fBgit\fR method, and all gems in the block will inherit those options\.
|
329
|
+
.
|
330
|
+
.SH "SOURCE PRIORITY"
|
331
|
+
When attempting to locate a gem to satisfy a gem requirement, bundler uses the following priority order:
|
332
|
+
.
|
333
|
+
.IP "1." 4
|
334
|
+
The source explicitly attached to the gem (using \fB:path\fR or \fB:git\fR)
|
335
|
+
.
|
336
|
+
.IP "2." 4
|
337
|
+
For implicit gems (dependencies of explicit gems), any git or path repository otherwise declared\. This results in bundler prioritizing the ActiveSupport gem from the Rails git repository over ones from \fBrubygems\.org\fR
|
338
|
+
.
|
339
|
+
.IP "3." 4
|
340
|
+
The sources specified via \fBsource\fR, in the order in which they were declared in the \fBGemfile\fR\.
|
341
|
+
.
|
342
|
+
.IP "" 0
|
343
|
+
|