summaryrefslogtreecommitdiff
path: root/lib/bundler/man/bundle-add.1
blob: 176e8b117e1e68af9085e951acdc096a5ab529be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-ADD" "1" "March 2025" ""
.SH "NAME"
\fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
.SH "SYNOPSIS"
\fBbundle add\fR \fIGEM_NAME\fR [\-\-group=GROUP] [\-\-version=VERSION] [\-\-source=SOURCE] [\-\-path=PATH] [\-\-git=GIT|\-\-github=GITHUB] [\-\-branch=BRANCH] [\-\-ref=REF] [\-\-quiet] [\-\-skip\-install] [\-\-strict|\-\-optimistic]
.SH "DESCRIPTION"
Adds the named gem to the [\fBGemfile(5)\fR][Gemfile(5)] and run \fBbundle install\fR\. \fBbundle install\fR can be avoided by using the flag \fB\-\-skip\-install\fR\.
.SH "OPTIONS"
.TP
\fB\-\-version=VERSION\fR, \fB\-v=VERSION\fR
Specify version requirements(s) for the added gem\.
.TP
\fB\-\-group=GROUP\fR, \fB\-g=GROUP\fR
Specify the group(s) for the added gem\. Multiple groups should be separated by commas\.
.TP
\fB\-\-source=SOURCE\fR, \fB\-s=SOURCE\fR
Specify the source for the added gem\.
.TP
\fB\-\-require=REQUIRE\fR, \fB\-r=REQUIRE\fR
Adds require path to gem\. Provide false, or a path as a string\.
.TP
\fB\-\-path=PATH\fR
Specify the file system path for the added gem\.
.TP
\fB\-\-git=GIT\fR
Specify the git source for the added gem\.
.TP
\fB\-\-github=GITHUB\fR
Specify the github source for the added gem\.
.TP
\fB\-\-branch=BRANCH\fR
Specify the git branch for the added gem\.
.TP
\fB\-\-ref=REF\fR
Specify the git ref for the added gem\.
.TP
\fB\-\-glob=GLOB\fR
Specify the location of a dependency's \.gemspec, expanded within Ruby (single quotes recommended)\.
.TP
\fB\-\-quiet\fR
Do not print progress information to the standard output\.
.TP
\fB\-\-skip\-install\fR
Adds the gem to the Gemfile but does not install it\.
.TP
\fB\-\-optimistic\fR
Adds optimistic declaration of version\.
.TP
\fB\-\-strict\fR
Adds strict declaration of version\.
.SH "EXAMPLES"
.IP "1." 4
You can add the \fBrails\fR gem to the Gemfile without any version restriction\. The source of the gem will be the global source\.
.IP
\fBbundle add rails\fR
.IP "2." 4
You can add the \fBrails\fR gem with version greater than 1\.1 (not including 1\.1) and less than 3\.0\.
.IP
\fBbundle add rails \-\-version "> 1\.1, < 3\.0"\fR
.IP "3." 4
You can use the \fBhttps://gems\.example\.com\fR custom source and assign the gem to a group\.
.IP
\fBbundle add rails \-\-version "~> 5\.0\.0" \-\-source "https://gems\.example\.com" \-\-group "development"\fR
.IP "4." 4
The following adds the \fBgem\fR entry to the Gemfile without installing the gem\. You can install gems later via \fBbundle install\fR\.
.IP
\fBbundle add rails \-\-skip\-install\fR
.IP "5." 4
You can assign the gem to more than one group\.
.IP
\fBbundle add rails \-\-group "development, test"\fR
.IP "" 0
.SH "SEE ALSO"
Gemfile(5) \fIhttps://bundler\.io/man/gemfile\.5\.html\fR, bundle\-remove(1) \fIbundle\-remove\.1\.html\fR